bind pub - !modlog atmlog
proc atmlog {nick uhost hand chan arg} {
set fd [open $::atmfile r]
while {![eof $fd]} {
lappend list [gets $fd]
set lines [split [read $fd] \n]
}
close $fd
foreach x $lines {
putquick "NOTICE $nick :$x"
}
return 1
}
I can't see a mistake in it and an error message does not occur. Actually this script should read a textfile and give all lines with a notice to a user. So, where is the mistake?