#This script is supposed to send a msg to a #Nospam channel when it #gets #notice which contains some forbidden strings.
# It actually works, but I would like it to react on chan notices in all #channels bot is in but it reacts not only on chan notices in chan "#".
#I would also like to make a lil stats, after sending msg about spammer #bot should add it stats, so when i type !spammers number of caught #spammers is displayed. Thanks a lot
bind NOTC - "*www.*" spamn
bind NOTC - "*http//*" spamn
bind NOTC - "*/server*" spamn
set chanz "#"
proc spamn { nick uhost handle text {dest ""} } {
global botnick chanz spammermask
if {[matchattr $nick m] || [isop $nick $chanz] || [matchattr $chanz f] || [isvoice $nick $chanz] || [matchattr $nick f|f $chanz]} {return 0}
if {$nick == $botnick} {return 0}
if {$nick == "ChanServ"} {return 0}
set spammermask "*!*[string range $uhost [string first "@" $uhost] end]"
putquick "PRIVMSG NoSpam :$nick address $spammermask was spamming"
return 1
}
putlog "! Loaded Spam Notice Detector !"