I wrote this little code:
on *:text:*:#:{
inc -u [ $+ [ %txtflood.secs ] ] %flood.lines. [ $+ [ $nick ] ]
if (%flood.lines. [ $+ [ $nick ] ] == %txtflood.lines) {
.msg #test -> txt flood by $nick
}
}
//set %txtflood.secs 10
//set %txtflood.lines 4
And i was wondering if it's a better way to do this? and if i really need to calculate the length/bytes of the text sent to the channel, or is this enough ? (and the %var's is set for testing, not the actual protection) haven't figured out how many lines in X seconds i should use.
