#Script is based on Notice Detector, it glines for channel notice made by
#normal user and increases a number in a file. I didn't do proc which #checks if file exists because it exists and no need to check it all the time
#It works for me, i'm just kinda not sure about the part with file. Thanks # any comments
bind NOTC - "*www.*" glinen
bind NOTC - "*http//*" glinen
bind NOTC - "*/server*" glinen
set gtime "5d"
proc glinen {nick uhost handle text dest} {
global botnick gtime
if {![validchan $dest]} { retrun 0 }
if {[matchattr $nick mf|mf $dest] || [isop $nick $dest] || [isvoice $nick $dest] || [matchattr $nick f|f $dest]} {return 0}
if {([isbotnick $nick]) || ([string tolower $nick] == "ChanServ")} {return 0}
set sm "*!*[lindex [split $uhost @] 1]"
putquick "PRIVMSG OperServ :gline $gtime $sm Auto Gline - spamming"
set o_fid [open "spammers.dat" r]
gets $o_fid spammerz
close $o_fid
set o_fid [open "spammers.dat" w]
puts $o_fid "[expr $spammerz + 1]"
close $o_fid
return 1
}
#stats
bind pub m !spammers spammers
proc spammers {nick host hand chan arg} {
global spammerz
set o_fid [open "spammers.dat" r]
gets $o_fid spammerz
close $o_fid
putserv "PRIVMSG $chan :$spammerz have been caught since bla"
}
putlog "Loaded Spam Notice Kill by Neuxs6"