his code was:
Code: Select all
bind pub - @find find:pub
proc find:pub {n u h c a} {
set a *[string map {" " *} $a]*
putserv "PRIVMSG $n :Searching for $a"
set i 0
set f [open "search.txt"]
while {[gets $f b]>-1} {
if {[string match -nocase $a $b]} {
incr i
putserv "PRIVMSG $n :$b"
}
}
close $f
if {$i} {
putserv "PRIVMSG $n :Search complete found $i result[expr {$i==1?"":"s"}]"
} {
putserv "PRIVMSG $n :No matches."
}
}
i tried adding some more calls but they all give errors:
Code: Select all
set m [open "search2.txt"]
set p [open "search3.txt"]
set x [open "search4.txt"]
while {[gets $f,$m,$p,$x b]>-1}
close $m
close $p
close $x