By number of characters
on *:text:*:#girc:{
var %1 = $remove($1-,$)
;if a person send a message with more than '300' characters it trigger the action
if ($len($strip(%1)) > 300) {
echo -a 4FLOOD: $nick said $len($strip(%1)) characters in one message.
mode # +m
}
}
By number of lines in a period of time
on *:text:*:#channel:{
;limite of lines before taking action
var %lines = 3
;interval of time (after the time the %var is reseted/removed)
var %time = 10
;set an %var with the person amount of lines sent
inc -u [ $+ [ %time ] ] %flood. [ $+ [ $nick ] ]
;if the number of lines the person said is the same or higher than the limit, it triggers the action
if (%flood. [ $+ [ $nick ] ] >= %lines) {
echo -a 4FLOOD: $nick said %lines in %time secs
mode # +m
;remove the %var
.unset %flood. [ $+ [ $nick ] ]
}
}
by number of words
on *:text:*:#channel:{
;20 is the limit of words
if ($0 >= 20) {
echo -a 4FLOOD: $nick said $0 words, limit: 20
mode # +m
}
}