Easy antispam script
mIRC Code
+ 0 likes
Please Register to submit score.
| 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)
As you can see the script will punish all form for adverising.
Copy/paste (ALT+R)
mIRC Snippet:
Easy antispam script
Posted on Sep 4, 2008 5:34 pm
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 } } |
mIRC Snippet:
Easy antispam script
Posted on Sep 4, 2008 5:37 pm
Posted on Sep 4, 2008 5:37 pm
if ($nick isop #) || ($nick == $me) { halt }
Wouldn't that work better? It is less code and in yours I though it would be:
&& not ||.
| Code: |
| if ($me isop #) { halt } |
| Code: |
| if ($nick isop #) && ($nick == $me) { halt } |
&& not ||.
mIRC Snippet:
Easy antispam script
Posted on Sep 5, 2008 4:13 pm
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.
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.
mIRC Snippet:
Easy antispam script
Posted on Sep 5, 2008 7:00 pm
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.
mIRC Snippet:
Easy antispam script
Posted on Sep 5, 2008 7:11 pm
Posted on Sep 5, 2008 7:11 pm
lol also a good point, still a much cleaner code nonetheless





