Code: Select all
# binds
bind pubm - "% *\\\?\\\?\\\?\\\?*" pub:questions
bind pubm - {* *#*} spam:pub
# flags
setudef flag spam
setudef flag annoy
# channel spam
proc spam:pub {nick uhost hand chan text} {
if {[channel get $chan spam] && [mytests $nick $hand $chan $text] != 0} {
set mask "*!*@[lindex [split $uhost @] 1]"
newchanban $chan $mask Spam "\00224\002 hours ban for spaming within $chan" 1440
}
}
# annoy - questions
proc pub:questions {nick uhost hand chan text} {
if {[channel get $chan annoy] && [mytests $nick $hand $chan $text] != 0} {
putlog "banned"
return
}
putlog "passed"
}
# my tests
proc mytests {nick hand chan text} {
if {[matchattr $hand of|fo $chan] || [isop $nick $chan] || ![string match "*#*" $text] || [string match "#" $text] || [validchan $text]} {
return 0
}
return 1
}