This script should send a msg to Operserv when gets spam strings via priv and should increase number of spammers caught in a file.
it doesn't work. It send a msg and everything is ok but it but couting is messed up
(TestBot) [04:18] TCL error [glinem]: channel "file11" wasn't opened for writing
# Privmsg BINDS
bind msgm - "*www.*" glinem
bind msgm - "*http//*" glinem
bind msgm - "*/server*" glinem
# Gline time in format Xd -days Xh -hours Xm -mins, Xs - seconds
set gtime "5d"
#PrivMsg gline proc
proc glinem {nick uhost handle text} {
global botnick gtime
if {[matchattr $nick f]} {return 0}
if {([isbotnick $nick]) || ([string tolower $nick] == "ChanServ")} {return 0}
set smm "*@[lindex [split $uhost @] 1]"
putquick "PRIVMSG Operserv :gline $gtime $smm Auto Gline - spamming"
set o_fid [open "spammers.dat" "RDONLY"]
gets $o_fid spammerz
puts $o_fid "[expr $spammerz + 1]"
close $o_fid
return 1
}
# Stats Area
bind pub m !spammers spammers
proc spammers {nick host hand chan arg} {
global spammerz
set o_fid [open "spammers.dat" "RDONLY"]
gets $o_fid spammerz
close $o_fid
putserv "PRIVMSG $chan :$spammerz have been caught since bla"
}