Basic repeat protection remote, you could add on extra lines if you wanted to detect whether the person sending the text is a channel operator. The remote is currently set to ban on 4 repeats in 10 seconds but that can be changed by altering the -u10's to something like -u20 which would make it 4 repeats every 20 seconds. You can also change the repeat count by altering the 4 in: if (%count >= 4) to another number such as 2 which means it would ban if the person repeated 2 times in the specified number of seconds. * For further help join #Advanced on IRC.AustNet.Org (paagrio.at.eu.austnet.org or sg.austnet.org)
on *:text:*:#: {
if ($nick == $me) { halt }
else {
var %text = $hash($strip($1-),32)
var %old.text = %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ]
var %old.text = $deltok(%old.text,1,46)
if (%rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ] == $null) || (%old.text != %text) {
set -u10 %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ] 1. $+ %text
}
var %temp = %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ]
var %count = $gettok(%temp,1,46)
inc %count
set -u10 %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ] %count $+ . $+ %text
if (%count >= 4) {
ban -u300 $chan $nick 3
kick $chan $nick $logo $+ Repeat Protection (2[A] $+ $chr(160) 4 Repeats in less than 10 seconds)
unset %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ]
}
}
}
Havent been seen in years but i dont care much you deserve the comment on this snippet.Looks like it works perfect to me I tested the shit outta it I tryed other codes an they seemed to act more like a line flood protection and not gather the text and call it back like this altho i set it really low to 3 lines so it actually triggers on a repeat like back to back repeat.I set it a Bit strict but it works nicely but to counter how strict i set the time to -u1 so some one either has to flood repeated text or type rather fast fast.all in all great job.