| View previous topic :: View next topic |
| Author |
Message |
Patty Voice
Joined: 27 Apr 2006 Posts: 3
|
Posted: Mon May 01, 2006 4:12 pm Post subject: cant add to next line! why? |
|
|
| Code: | bind pub - !set chan:level
proc chan:level {nick uhost hand chan text} {
set AuthNick [lindex $text 0]
set Authlevel2 0
set Authlevel 0
set Authlevel [getchanlogin $nick]
set Authlevel2 [getchanlogin $AuthNick]
if {"$Authlevel2" == "0"} {
putquick "NOTICE $nick :$AuthNick is not authed!"
return 0
} else {
set fs [open $chan.ini r+]
set finished 0
while {![eof $fs] && !$finished} {
gets $fs line
if {"[lindex $line 0]" == "$Authlevel" && "[lindex $line 1]" == "owner" } {
putquick "NOTICE $nick :$Authlevel $Authlevel2"
puts $fs "$Authlevel2 [lindex $text 1]"
close $fs
set finished 1
} else {
putquick "NOTICE $nick :Your not set as Owner or Master to $chan"
}
}
}
return 0
} |
it will not add to the next line but add it to the current line :S
please help :S |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Tue May 02, 2006 8:36 am Post subject: |
|
|
add to which line? your are missing a more detailed explanation of your problem. I really dont understand what you want. _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Tue May 02, 2006 10:43 am Post subject: |
|
|
you may do better using | Code: | | set fs [open $chan.ini a+] |
r+ Open the file for both reading and writing; the file must already exist.
a+ Open the file for reading and writing. If the file doesn't exist, create a new empty file. Set the initial access position to the end of the file.
The r+ option does not tell it to start a new line for input. |
|
| Back to top |
|
 |
|