Auto Kick/ban for website/server name/E-mail

By Ahmed Zaggoudi on Apr 23, 2011

Hi
Simple snippet !
Auto kick ban
if you don't like to ban an user remove (mode $chan +bb $nick $adress

on *:TEXT:*.com*:*: {
  mode $chan +bb $nick $address 
  kick $chan $nick ADS are prohibited! here ! (spam)
}
on *:TEXT:irc.*.net*:*: {
  mode $chan +bb $nick $address 
  kick $chan $nick ADS are prohibited! here ! (spam)
}
on *:TEXT:irc.*.com*:*: {
  mode $chan +bb $nick $address 
  kick $chan $nick ADS are prohibited! here ! (spam)
}
on *:TEXT:www:*: {
  mode $chan +bb $nick $address 
  kick $chan $nick ADS are prohibited! here ! (spam)
}
on *:TEXT:*.fr*:*: {
  mode $chan +bb $nick $address 
  kick $chan $nick ADS are prohibited! here ! (spam)
}
on *:TEXT:*http*:*: {
  mode $chan +bb $nick $address 
  kick $chan $nick ADS are prohibited! here ! (spam)
}
on *:TEXT:*http://*:*: {
  mode $chan +bb $nick $address 
  kick $chan $nick ADS are prohibited! here ! (spam)
}
on *:TEXT:*.net*:*: {
  mode $chan +bb $nick $address 
  kick $chan $nick ADS are prohibited! here ! (spam)
}
on *:TEXT:*.net*:*: {
  mode $chan +bb $nick $address 
  kick $chan $nick ADS are prohibited! here ! (spam)
}
on *:TEXT:*.*@live.*:*: {
  mode $chan +bb $nick $address 
  kick $chan $nick ADS are prohibited! here ! 
}
on *:TEXT:*.*@hotmail.*:*: {
  mode $chan +bb $nick $address 
  kick $chan $nick ADS are prohibited! here ! 
}
on *:TEXT:*.*@live.*:*: {
  mode $chan +bb $nick $address 
  kick $chan $nick ADS are prohibited! here ! 
}
on *:TEXT:*.*@yahoo.*:*: {
  mode $chan +bb $nick $address 
  kick $chan $nick ADS are prohibited! here ! 
}

Comments

Sign in to comment.
Callumlord   -  Apr 24, 2011

Very nice!

 Respond  
Wade   -  Apr 24, 2011

as Jethro said using regex you could condense it to something like this

on *:TEXT:/(http://|(www)[.]|[.](com|net)|[@](live|hotmail)[.]):#: {
kick $chan $nick $time(hh:nn:tt:) Do not say badword here!
mode $chan +bb $address($nick,2) $address(nick,3)
}

thats a really bad example of regex by my, and its not tested, but thats what you could condense it down too, could probably make it even smaller if someone pro at regex gives it a go.

 Respond  
Ahmed Zaggoudi   -  Apr 24, 2011

You're right ,
for my snippet i can use this to avoid lines
on :text::#: {
if ($nick($chan,$nick,vr)) && ($istok(.com www. http:// irc..net irc..com @live. @hotmail. @yahoo.,$1-,32)) {
kick $chan $nick $time(hh:nn:tt) Do not say badword here!
mode $chan +bb $nick $adress
}
}

 Respond  
Jethro   -  Apr 23, 2011

Humbly speaking, I don't quite consider myself a regex expert yet, and I'm still learning as much as I can. I'll suggest and encourage you to learn about regular expressions too, so you can apply a regex pattern to shrink down your overall snippet into one text event, which requires a couple of lines for a spam detector. It's much more efficient than making a crazy amount of repetitions and text events.

 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.