#Anti Repeat (punish users after repeating 3times in a row)
#Made by znarrez i think. (old script)
######################################
on *:TEXT:*:#: { RepeatCheck $strip($1-) }
on *:NOTICE:*:#: { RepeatCheck $strip($1-) }
on *:ACTION:*:#: { RepeatCheck $strip($1-) }
CTCP *:*:#: { RepeatCheck $strip($1-) }
alias RepeatCheck {
var %MaxRepeation = 3
var %RepeatBanMessage = Why do you need to repeat? ((3 times repeat) tempban 2 Mins.)
;script
if $nick !isreg $chan { goto END }
if $me !isop $chan { goto END }
if %repeat. [ $+ [ $chan ] $+ . [ $+ [ $nick ] ] ] == $null {
set -u10 %repeat. $+ $chan $+ . $+ $nick 1
set -u10 %sentence. $+ $chan $+ . $+ $nick $1-
halt
}
if $1- == %sentence. [ $+ [ $chan ] $+ . [ $+ [ $nick ] ] ] {
inc %repeat. $+ $chan $+ . $+ $nick
if %repeat. [ $+ [ $chan ] $+ . [ $+ [ $nick ] ] ] == %MaxRepeation && %repeatflood != 1 {
set -u5 %repeatflood 1
ban -ku120 $chan $nick 2 %RepeatBanMessage
;this is not needed, if you want to use it, put this in your alias section
;debug.chan { return #yourdebugchan }
;msg $debug.chan 14[4RepeatBan14] on # :: $nick :: %RepeatBanMessage
}
}
else {
set -u10 %repeat. $+ $chan $+ . $+ $nick 1
set -u10 %sentence. $+ $chan $+ . $+ $nick $1-
}
:END
}
Comments