SHARE
TWEET

Anti-Repeat

Seb May 7th, 2011 (edited) 573 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Anti Repeat (punish users after repeating 3times in a row)
  2. #Made by znarrez i think. (old script)
  3. ######################################
  4.  
  5. on *:TEXT:*:#: { RepeatCheck $strip($1-) }
  6. on *:NOTICE:*:#: { RepeatCheck $strip($1-) }
  7. on *:ACTION:*:#: { RepeatCheck $strip($1-) }
  8. CTCP *:*:#: { RepeatCheck $strip($1-) }
  9.  
  10.  
  11. alias RepeatCheck {
  12.   var %MaxRepeation = 3
  13.   var %RepeatBanMessage = Why do you need to repeat? ((3 times repeat) tempban 2 Mins.)
  14.   ;script
  15.   if $nick !isreg $chan { goto END }
  16.   if $me !isop $chan { goto END }
  17.   if %repeat. [ $+ [ $chan ] $+ . [ $+ [ $nick ] ] ] == $null {
  18.     set -u10 %repeat. $+ $chan $+ . $+ $nick 1
  19.     set -u10 %sentence. $+ $chan $+ . $+ $nick $1-
  20.     halt
  21.   }
  22.   if $1- == %sentence. [ $+ [ $chan ] $+ . [ $+ [ $nick ] ] ] {
  23.     inc %repeat. $+ $chan $+ . $+ $nick
  24.     if %repeat. [ $+ [ $chan ] $+ . [ $+ [ $nick ] ] ] == %MaxRepeation && %repeatflood != 1 {
  25.       set -u5 %repeatflood 1
  26.       ban -ku120 $chan $nick 2 %RepeatBanMessage
  27.       ;this is not needed, if you want to use it, put this in your alias section
  28.       ;debug.chan  { return #yourdebugchan }
  29.       ;msg $debug.chan 14[4RepeatBan14] on # :: $nick :: %RepeatBanMessage
  30.     }
  31.   }
  32.   else {
  33.     set -u10 %repeat. $+ $chan $+ . $+ $nick 1
  34.     set -u10 %sentence. $+ $chan $+ . $+ $nick $1-
  35.   }
  36.   :END
  37. }
RAW Paste Data
Top