anti inviter/spam

By |[Arkham]| on Jun 10, 2009

description : anti spammer ( update )
action : ban and kick target nick (if u were op and target nick were same channel with you)
this simple snippet trigger when somebody/some nick privmsg you with words "http.*" and "www."
just simply load it into your remote script.

credit to jethro_ and Napa182

on ^1:OPEN:?:*:if ($regex($1-,/(http:\/\/\w+|www\.\w+)/i)) { spamkick $nick }
alias spamkick {
  var %sk $comchan($1,0)
  while (%sk) {
    if ($comchan($1,%sk).op) { if ($1 !isop $comchan($1,%sk)) { ban -k $comchan($1,%sk) $1 posibble inviter. } }
    dec %sk
  }
}

Comments

Sign in to comment.
Legion^   -  Mar 23, 2010

nice one hehehehe

 Respond  
|[Arkham]|   -  Jun 11, 2009

well.. thx for the comments guys really appreciated here..
Jethro_ yeah ive just starting to learn regex here.. basicly i can use "isin" operator. like if (www. isin $1-).. im still learing to use $regex.. but thanks ..
napa182: yeah /ban -k is very good idea im just figure it out.. thanks..
jonessy44 on next version maybe i`ll add a an asterisk () wildsite so any symbol following http like "http" so the script will be read more "flexible" .. thanks

 Respond  
Jonesy44   -  Jun 11, 2009

I don't get why they do.. does anyone /actually/ open those links..?

 Respond  
Jethro   -  Jun 11, 2009

You'd be buggered if someone just went "Hey dude check out this YouTube link! http://blabla.com" Nice idea, just not 100% worked through like :/Well, it's not as bad as "buggered" since it's designed for query or PM. Most users do link posting in the main channel. Furthermore, he can add an enable-and-disable switch for the script.

 Respond  
Jonesy44   -  Jun 10, 2009

You'd be buggered if someone just went "Hey dude check out this YouTube link! http://blabla.com" Nice idea, just not 100% worked through like :/

 Respond  
napa182   -  Jun 10, 2009

also you can use ban -k for the kick ban

alias kickban {
  var %g = $comchan($1,0)   
  while (%g) {
    if ($comchan($1,%g).op) ban -k $comchan($1,%g) $1 2 Reason:spammer!! 
    dec %g
  }
}
 Respond  
Jethro   -  Jun 10, 2009

Your regex is not really well constructed. You can use the /i flag to make it case insensitive. Also, your regex will match www........... followed by many dots and http..... followed by many characters after.
This one will only match http:// followed by domain names. That goes the same for www. followed by domain names:

if ($regex($1-,/(http:\/\/\w+|www\.\w+)/i))
 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.