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 10
;this is the bantime in seconds
set %flood.bantime 300
}
on *:TEXT:*:#: {
if ($nick !isop $chan) {
if ($nick !ishop $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 4Stop Flooding! (Warning)
halt
}
else {
ban $($+(-ku,%flood.bantime)) $chan $nick 3 4Stop Flooding! (3 Min Ban)
}
}
}
}
}