Will kick ban anyone pasting www. # .com .net .org .info .ar .ag .biz .ca .tk .uk http
Except target is voiced or opped
on &1:TEXT:*:#:{
if ($nick isvo #) || ($nick isop #) || ($me !isop #) return
if (*www*.* iswm $1-) k.b
if (*http://* iswm $1-) k.b
if ($chr(35) isin $1-) k.b
if (*.com* iswm $1-) k.b
if (*.net* iswm $1-) k.b
if (*.ca* iswm $1-) k.b
if (*.org* iswm $1-) k.b
if (*.info* iswm $1-) k.b
if (*.biz* iswm $1-) k.b
if (*.tk* iswm $1-) k.b
if (*.ca* iswm $1-) k.b
if (*.uk* iswm $1-) k.b
if (*.ar* iswm $1-) k.b
if (*.ag* iswm $1-) k.b
}
alias k.b { mode # +b $address($nick,2) | kick # $nick Spam detected! /msg @ops in case if this was an error. | halt }
Your if comparison is ambiguous. you put If ($nick isop #) and then if ($nick !isop #)...do you want the op kicked or saved? Additionally, the isvo is an obsolete operator. You should use isvoice instead.
''/msg @ops in case if this was an error. | halt" <- I'm not sure why you place that phrase in the first place. It's not needed.
Your script will be a lot easier with regular expressions:
on @*:TEXT:*:#: {
var %x = /(http:\/\/\w+|www\.\w+)/i, %y = /\.(\w+){2,3}$/i
if ($nick !isop #) && ($nick isvoice #) && ($regex($1-,%x)) || ($regex($1-,%y)) {
ban -k # $nick 2 Spam detected!
}
}
This code I show you will cover everything and kick ONLY the voiced users, excluding the oppers.