stop message flood - 22/11/03 10:39 PM
how to stop message flood by a user?
on *:TEXT:*:?: { inc -u5 $+(%,text,$nick) if ($eval($+(%,text,$nick),2) > 5) ignore -u600 $nick }
on *:TEXT:*:[color:red]*[/color]: { ; ------------------------------------------------------- ; Settings ; var %lines = 4 | ; line count var %delay = 5 | ; lines in __ seconds var %ignore = 300 | ; seconds to ignore person ; ; ------------------------------------------------------- ; Spam Protection ; -- ; Saying several lines of (different) text, in a short ; duration of time. ; /inc -u $+ %delay %msg. [ $+ [ $chan ] $+ [ $nick ] ] if (%msg. [ $+ [ $chan ] $+ [ $nick ] ] >= %lines) { .ignore -u $+ %delay $address($nick, 11) return } ; ; ------------------------------------------------------- ; Flood protection ; -- ; Repeating the same message in a short duration of time ; if (%lm. [ $+ [ $chan ] $+ [ $nick ] ] != $1-) { /set -u $+ %delay %lm. [ $+ [ $chan ] $+ [ $nick ] ] } else { /inc -u $+ %delay %fld. [ $+ [ $chan ] $+ [ $nick ] ] if (%fld. [ $+ [ $chan ] $+ [ $nick ] ]) { .ignore -u $+ %delay $address($nick, 11) return } } }