Kick ban spammers

By independentt on Jun 30, 2009

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 }

Comments

Sign in to comment.
blitzz   -  Jul 01, 2009

Kick ban & ban kick are different..You actually ban then kick them..But not important thing..Just telling you.

kick # $nick Spammer detected! | mode # +b $address($nick,2)

OR

$wildsite

AND

maybe if $regex($1,/(http|www|com|net|?|?|?)/i) }

 Respond  
Weasel   -  Jul 01, 2009

Duh. Thats THE POINT ;p

 Respond  
Jethro   -  Jun 30, 2009

isvo did exist in the old mirc days, but has been replaced by isvoice and won't work anymore. isvoice is now the standard operator.

 Respond  
Weasel   -  Jun 30, 2009

well for one, what does if ($nick isvo) even do? its isvoice

 Respond  
Jethro   -  Jun 30, 2009

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.

 Respond  
independentt   -  Jun 30, 2009

above code untested feel free to comment bugs

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.