All pastes #362320 Raw Edit

Something

public text v1 · immutable
·published 2007-02-18 19:11 UTC
rendered paste body
on *:START: { 
  ;if user sends more than %flood.lines in this time ban them 
  set %flood.unset 3
  ;if a user sends more than this many lines/actions in %flood.unset ban them 
  set %flood.lines 5 
  ;this is the bantime in seconds 
  set %flood.bantime 120
} 
on *:TEXT:*:#: {
  if ($nick !isop $chan) { 
    inc $($+(-u,%flood.unset)) $+(%,flood.,$chan,.,text.,$nick) 
    if ($($+(%,flood.,$chan,.,text.,$nick),2) >= %flood.lines) {
      if (!$($+(%,flood.,$chan,.warning.,$nick),2)) {
        set -u300 $+(%,flood.,$chan,.warning.,$nick) 1
        kick $chan $nick Don't flood - Warning.
        halt
      }
      else {
        ban $($+(-ku,%flood.bantime)) $chan $nick 3 Flooding In This Channel IS NOT Allowed.
      }
    } 
  }