on *:start: {
;if user sends more than %flood.lines in this time ban them
set %flood.unset 10
;
;if a user sends more than this many lines/actions in %flood.unset ban them
set %flood.lines 6
;
;this is the bantime in seconds
set %flood.bantime 300
}
on @*:text:*:#JMS:{ if ($nick !isop $chan) { _floodchk } }
on @*:action:*:#JMS:{ if ($nick !isop $chan) { _floodchk } }
alias -l _floodchk {
set -u $+ %flood.unset $+(%,flood.,#,.,$site,.,$ticks,$rand(10000,19999)) .
if ($var($+(%,flood.,#,.,$site,.*),0) > %flood.lines) {
ban $+(-ku,%flood.bantime) # $nick 3 Flood protection: More than %flood.lines lines in %flood.unset seconds, $duration(%flood.bantime) ban!
unset $+(%,flood.,#,.,$site,.*)
}
}