Code: Select all
setudef flag colour
bind ctcp * ACTION action:colour
proc action:colour {nick uhost hand dest keyword text} {
if {$nick == $::botnick || ![channel get $dest colour] || [matchattr $hand of|fo $dest] || [isop $nick $dest]} { return }
if {![string match "*\002*" $text] || ![string match "*\003*" $text] || ![string match "*\026*" $text] || ![string match "*\037*" $text]} { return }
if {[string match "*#*" $text]} {
channel:spam $nick $uhost $hand $chan $text
return
}
if {[string match "*www.*" $text] || [string match "*http*" $text]} {
web:spam $nick $uhost $hand $chan $text
return
}
if {![botisop $dest]} {
set mask "*!*@[lindex [split $uhost @] 1]"
newchanban $dest $mask Colour "\0025\002 minutes ban for using colours within $dest" 5
return
}
set mask "*!*@[lindex [split $uhost @] 1]"
newchanban $dest $mask Colour "\0025\002 minutes ban for using colours within $dest" 5
}