All pastes #420541 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-02 06:44 UTC
rendered paste body
Flood control:
on *:text:*:#: {
  inc %noobz 1
  if (%floodprotection. [ $+ [ $chan ] ] == ON) {
    if ($me isop $chan) || ($me ishop $chan) {
      hinc -mu5 flood $nick 1
      if ($hget(flood,$nick) > 5) {
        ban -ku300 $chan $nick 2 $c1(Banned for text flood.) $c2(5 minute ban) $c1(Noobs owned: %noobz)
        hdel -s flood $nick
      }
    }
  }
}
---
Repeation:
on *:text:*:#: {
  if (%floodprotection. [ $+ [ $chan ] ] == ON) {
    if ($me ishop $chan) || ($me isop $chan) {
      var %Time = 60
      var %Repeats = 3
      var %BanTime = 5
      ; Change these values to: Time delay, number of messages and BanTime in minutes.
      if (!%Repeat. [ $+ [ $nick ] ]) {
        inc $+(-u,%Time) $+(%,Repeat.,$nick)
        set $+(%,Repeat.,$nick,.1) $hash($strip($1-),32)
      }
      elseif ($($+(%,Repeat.,$nick,.,1),2) = $hash($strip($1-),32)) {
        inc $+(-u,%Time) $+(%,Repeat.,$nick)
        var %y = $($+(%,Repeat.,$nick),2)
        set $+(-u,%Time) $+(%,Repeat.,$nick,.,%y) $hash($strip($1-),32)
        if ($($+(%,Repeat.,$nick),2) >= %Repeats) {
          ban $+(-ku,$calc(%BanTime * 60)) $chan $nick 2 $+($chr(91),%BanTime,min tempban,$chr(93)) %Repeats repeats in less then %time seconds. Noobs owned: %noobz
          unset $+(%,Repeat.,$nick,*)
        }
      }
      elseif (%Repeat. [ $+ [ $nick ] ]) {
        inc $+(-u,%Time) $+(%,Repeat.,$nick)
        set $+(%,Repeat.,$nick,.1) $hash($strip($1-),32)
        unset $+(%,Repeat.,$nick,*)
      }
    }
  } 
}

PUT THEM IN DIFF FILES!