What i got now is:
Code: Select all
proc pub_addname {nick uhost hand chan arg} {
if {[string tolower $chan] == "#<chan>" } {
set site "-[string tolower [lindex $arg 0]]-"
set name [lrange $arg 1 end]
set file1r [open "sites.ini" r+]
set file2 [read $file1r]
foreach line [split $file2 "n"] {
if { [string tolower $line] == $site } {
putserv "PRIVMSG #<chan> :site found"
set found 1
} else { if {$found != 1 } { putserv "PRIVMSG #<chan> :site not found" } }
if { $found == 1 && $nameset != 1 } {
if { [lsearch -exact $line "name"] != 1 } {
putserv "PRIVMSG #<chan> :name field found"
set nameset 1
}
}
}
close $file1r
close $file2
}
}
the name field in the .ini file is in the format:
name=<name> (??? by default)
the name of the site is in the format:
-<sitename>-
after -<sitename>-, all the fields for that site are shown, each at a new line.
Does anyone know how i can change the value from ??? to the given name, or from the old name to the new name??
Thx alot, i've been trying for hours but it still won't work
Greejtz, Zygo.
<font size=-1>[ This Message was edited by: Zygomaticum on 2002-03-01 13:09 ]</font>