Top

Easy antispam script


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Sep 04, 2008
Last Updated  Sep 04, 2008
Tags  anti  antispam  protectspam  spam 

Description

This is a very simple antispam script.

As you can see the script will punish all form for adverising.

Copy/paste (ALT+R)

Grab the Code

;Advert
on *:TEXT:#*:#:{ 
  if ($nick isop #) || ($nick == $me) { halt }
  inc %kicked
  timer 1 0 raw -q MODE $chan +b $address($nick,2)
  timer 1 1 raw -q KICK $chan $nick : Dont advertise here! tempban «10 min» ID: %kicked
  timer 1 600 raw -q MODE $chan -b $address($nick,2)
}
 
on *:TEXT:¤*:#:{ 
  if ($nick isop #) || ($nick == $me) { halt }
  inc %kicked
  timer 1 0 raw -q MODE $chan +b $address($nick,2)
  timer 1 1 raw -q KICK $chan $nick : Dont advertise here! tempban «10 min» ID: %kicked
  timer 1 600 raw -q MODE $chan -b $address($nick,2)
}
 
on *:TEXT:www*:#:{ 
  if ($nick isop #) || ($nick == $me) { halt }
  inc %kicked
  timer 1 0 raw -q MODE $chan +b $address($nick,2)
  timer 1 1 raw -q KICK $chan $nick : Dont advertise here! tempban «15 min» ID: %kicked
  timer 1 900 raw -q MODE $chan -b $address($nick,2)
}
 
on *:TEXT:http://*:#:{ 
  if ($nick isop #) || ($nick == $me) { halt }
  inc %kicked
  timer 1 0 raw -q MODE $chan +b $address($nick,2)
  timer 1 1 raw -q KICK $chan $nick : Dont advertise here! tempban «15 min» ID: %kicked
  timer 1 900 raw -q MODE $chan -b $address($nick,2)
}
 
on *:TEXT:join*:#:{ 
  if ($nick isop #) || ($nick == $me) { halt }
  inc %kicked
  timer 1 0 raw -q MODE $chan +b $address($nick,2)
  timer 1 1 raw -q KICK $chan $nick : Dont advertise here! tempban «30 min» ID: %kicked
  timer 1 3600 raw -q MODE $chan -b $address($nick,2)
}
 
on *:TEXT:idle*:#:{ 
  if ($nick isop #) || ($nick == $me) { halt }
  inc %kicked
  timer 1 0 raw -q MODE $chan +b $address($nick,2)
  timer 1 1 raw -q KICK $chan $nick : Dont advertise here! tempban «30 min» ID: %kicked
  timer 1 3600 raw -q MODE $chan -b $address($nick,2)
}
 

Comments

  (5)  RSS
napalm`
Comments: 180
 
mIRC Snippet:  Easy antispam script
Posted on Sep 4, 2008 5:34 pm
Code:
on @$1:TEXT:/^(#|www|¤|http|join|idle)/i:#:{
  if ($nick !isop #) {
    inc %kicked
    ban -ku3600 # $nick Dont advertise here! tempban «30 min» ID: %kicked
  }
}
DangerOfFate
Comments: 41
 
mIRC Snippet:  Easy antispam script
Posted on Sep 4, 2008 5:37 pm
if ($nick isop #) || ($nick == $me) { halt }


Code:
 if ($me isop #) { halt }
Wouldn't that work better? It is less code and in yours I though it would be:

Code:
 if ($nick isop #) && ($nick == $me) { halt }

&& not ||.
IFHTT
Comments: 13
 
mIRC Snippet:  Easy antispam script
Posted on Sep 5, 2008 4:13 pm
DangerOfFate, Your recommendation is rather pointless

The original if statement says if the nick is op'ed on the channel OR the nick is me then halt the script.

Your first if statement says if i'm an op on the channel then halt the script which would result in the script not working period if you were op'ed

Your second recommendation says if the nick is op'ed on the channel AND the nick is me then halt the script.

This would do the exact same thing as your first recommendation and would render the script useless. In this case || is the correct way to combine the comparisons.

napalm`s code is closer to ideal. Only "&& ($nick != $me)" isn't necessary since it will only trigger if you have ops in the channel anyway, so "if ($nick !isop #)" would cover it, though it will still work just fine.
napalm`
Comments: 180
 
mIRC Snippet:  Easy antispam script
Posted on Sep 5, 2008 7:00 pm
Actually, you're right, it wasn't needed. Not because $me would have ops, but because 'on *:TEXT:*:*:' does not trigger when $me types anyway. Minor oversight.
IFHTT
Comments: 13
 
mIRC Snippet:  Easy antispam script
Posted on Sep 5, 2008 7:11 pm
lol also a good point, still a much cleaner code nonetheless

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  

Bottom