very simple script text line floods protection....
text,notice,action floods protection...
it's will kick user when typed 4 lines text in 3second....
Updated.....
on *:text:*:#:{
if ($me !isop #) { return }
if ($IsNormUser($nick) == no) { return }
inc -u3 %asd. [ $+ [ $nick ] $+ [ $chan ] ]
if (%asd. [ $+ [ $nick ] $+ [ $chan ] ] == 4) {
if ($nick ison #) { ban -ku120 # $nick 4 4Don't flood - 12You Have typed 0,1[TEXT]12,0 4 Lines below 3sec 11,1[banned 2min] }
unset %asd. [ $+ [ $nick ] $+ [ $chan ] ]
}
}
on *:action:*:#:{
if ($me !isop #) { return }
if ($IsNormUser($nick) == no) { return }
inc -u3 %asda. [ $+ [ $nick ] $+ [ $chan ] ]
if (%asda. [ $+ [ $nick ] $+ [ $chan ] ] == 4) {
if ($nick ison #) { ban -ku120 # $nick 4 4Don't flood - 12You Have typed 6,1[ACTION]12,0 4 Lines below 3sec 11,1[banned 2min] }
unset %asda. [ $+ [ $nick ] $+ [ $chan ] ]
}
}
on *:notice:*:#:{
if ($me !isop #) { return }
if ($IsNormUser($nick) == no) { return }
inc -u3 %asdn. [ $+ [ $nick ] $+ [ $chan ] ]
if (%asdn. [ $+ [ $nick ] $+ [ $chan ] ] == 4) {
if ($nick ison #) { ban -ku120 # $nick 4 4Don't flood - 12You Have typed 7,1[NOTICE]12,0 4 Lines below 3sec 11,1[banned 2min] }
unset %asdn. [ $+ [ $nick ] $+ [ $chan ] ]
}
}
alias IsNormUser {
;; checking if the user is in @+- mode #
; if (@+- isin $nick(#,$1).pnick) { return no | halt }
; checking if user is op # mode
if ($1 isop #) { return no | halt }
; checking is user is in Voice mode #
if ($1 isvo #) { return no | halt }
; checking if user is in UVoice mode #
if ($mid($nick(#,$1).pnick,1,1) == -) { return no | halt }
; the user is no mode in # so return yes
return yes
}
napa182 still need to check it.. bcoz maybe the $nick have been kicked 1st by someone else in that chan(op) while this script doing its job[this less flooding command - ur are not kick nick that not in the chan anymore]...the -u will unset it auto but it's still good if ur unset it after kicked that user...
cheiron ya i have not add the op checking bcoz this just a simple....not full script..but now i have update it..
anyway thanks guys 4da comment.. :)
um one thing as well why do you have it unset the inc var after the kick if you have it auto unsetting after 3 seconds?
no real need to check if $nick ison # when ur var is already doing that .
you could just do
on @*:text:*:#:{
inc -u3 $+(%,asd,.,$nick,.,$chan)
if ($($+(%,asd,.,$nick,.,$chan),2) == 4 && $nick !isop #) { ban -ku120 # $nick 4 4Don't flood - 12You Have typed 0,1[TEXT]12,0 4 Lines below 3sec 11,1[banned 2min] }
}