spam protection help - 13/02/17 03:10 PM
Code:
on *:text:!timeout*:#: { if ($nick isop $chan) { if ($2 == line) { if ($3 isnum) { %spamline = $abs($int($3)) msg # Spamline is now $abs($int($3)) $+ . Messaging $abs($int($3)) times in a row will timeout you! } else { msg # $3 is not a number! | return } } elseif ($2 == time) { if ($3 isnum) { %spamtime = $abs($int($3)) msg # Timeout time is now $abs($int($3)) $+ ! } else { msg # $3 is not a number! | return } } elseif ($2 == message) { %spammessage = $3- msg # Timeout message is now : $3- } else { msg # insufficient parameters. !timeout <line,time,message> <parameter> } } else { msg # You dont have permission to do that! } } on *:text:*:#: { if ($nick isop $chan) { return } if ($nick == %spamnick) { inc %spamlines if (%spamlines == %spamline) { msg # .timeout $nick %spamtime %spammessage msg # $nick you're spamming too fast. slow down! %spamlines = 1 } } else { %spamnick = $nick %spamlines = 1 } }
This works but it does not work when the moderator writes.
Code:
viewer:1 viewer:2 viewer:3 bot:viewer you are spamming to fast. timeout!
this is working good
Code:
viewer:1 viewer:2 moderatör:hi viewer:hello bot:viewer you are spamming to fast. timeout!
this is wrong because writing 1 time.
code is ignoring moderators.