on *:text:*:#: {
var %unset = 10, %limit = 4
; add to a TABLE "flood" the ITEM "<$cid><$chan><$nick><randomnumber> with DATA <dummy-char>
hadd $+(-mu,%unset) flood $+($cid,$chr(10),$chan,$chr(10),$nick,$chr(10),$rand(1,999)) x
if ($hfind( flood, $+($cid,$chr(10),$chan,$chr(10),$nick,$chr(10),*) ,0,w) >= %limit) {
echo $chan $nick wrote $v1 lines on $chan in %unset seconds. limit is $v2
}
}