This is my first flood protection script
!floodon to turn on !floodoff to turn off
When !floodon is triggered it will set the channel and only work in the channels it is activated in
Can only be turned on and off by half op or higher
hope you enjoy XD
on *:text:!floodon:#:{
if ($nick isop $chan) || ($nick ishop $chan) {
if (%floodchan) {
notice $nick flood protection is already on for $chan
}
else {
set %floodchan $addtok(%floodchan,$chan,44)
msg $chan 4Flood protection is now on for $chan
}
}
}
on *:text:!floodoff:#:{
if ($nick isop $chan) || ($nick ishop $chan) {
if (%floodchan) {
set %floodchan $remtok(%floodchan,$chan,1,44)
msg $chan 4Flood protection is now off for $chan
}
else {
notice $nick Flood protection is already turned off for $chan
}
}
}
on *:text:*:%floodchan: {
if $nick !isop $chan {
hadd -mu10 chanflood $+($nick,.,$chan,.,$ticks) 1
if ($hfind(chanflood,$+($nick,.*),0,w) > 6) {
ban $+(-,ku,$calc(60)) $chan $nick $nick Dont Flood $chan !!! (1 Minute Ban)
}
}
}
It does work for more than one channel its set to add the channels each to the %var independantly and remove each in the same way
Thats what the
set %floodchan $addtok(%floodchan,$chan,44)
and
set %floodchan $remtok(%floodchan,$chan,44)
is for to add and remove new channels to the variable
so it will work in the channel\'s it has been activated and wont do anything in the ones its not activated in
so yeah it does work in different channels at once
not just one as you put it lol