# Flood Protection2 by elsayedbadwi

VIEWS: 0 PAGES: 1

• pg 1
```									on *:text:*:#:{
if (\$address(\$nick,4) == \$address(\$me,4)) { halt }
set -u3 %flood. [ \$+ [ \$chan ] \$+ ] . [ \$+ [ \$nick ] ] \$calc(%flood. [
\$+ [ \$chan ] \$+ ] . [ \$+ [ \$nick ] ] + 1)
if (%flood. [ \$+ [ \$chan ] \$+ ] . [ \$+ [ \$nick ] ] >= 3) {
/kick \$chan \$nick 15,1?- 14,1[+ 15,1]= 0? Dont Flood
0,1? 15,1=[ 14+] 15-?
//inc %ban. [ \$+ [ \$nick ] \$+ ] . [ \$+ [ \$chan ] ] 1
unset %flood. [ \$+ [ \$chan ] \$+ ] . [ \$+ [ \$nick ] ]
if (%ban. [ \$+ [ \$nick ] \$+ ] . [ \$+ [ \$chan ] ] >= 6) {
/ban \$chan \$nick 3
/ban \$chan \$nick 5
/ban \$chan \$nick 6
//mode \$chan +b \$nick
//timer -o 1 300 //mode \$chan -b \$nick
//timer -o 1 300 //mode \$chan -b \$address(\$nick,3)
//timer -o 1 300 //mode \$chan -b \$address(\$nick,6)
//timer -o 1 300 //mode \$chan -b \$address(\$nick,5)
//unset %ban. [ \$+ [ \$nick ] \$+ ] . [ \$+ [ \$chan ] ]
}
}
}
on *:ACTION:*:#:{
if (\$address(\$nick,4) == \$address(\$me,4)) { halt }
set -u3 %flood. [ \$+ [ \$chan ] \$+ ] . [ \$+ [ \$nick ] ] \$calc(%flood. [
\$+ [ \$chan ] \$+ ] . [ \$+ [ \$nick ] ] + 1)
if (%flood. [ \$+ [ \$chan ] \$+ ] . [ \$+ [ \$nick ] ] >= 3) {
/kick \$chan \$nick 15,1?- 14,1[+ 15,1]= 0? Dont Flood
0,1? 15,1=[ 14+] 15-?
//inc %ban. [ \$+ [ \$nick ] \$+ ] . [ \$+ [ \$chan ] ] 1
unset %flood. [ \$+ [ \$chan ] \$+ ] . [ \$+ [ \$nick ] ]
if (%ban. [ \$+ [ \$nick ] \$+ ] . [ \$+ [ \$chan ] ] >= 6) {
/ban \$chan \$nick 3
/ban \$chan \$nick 5
/ban \$chan \$nick 6
//mode \$chan +b \$nick
//timer -o 1 300 //mode \$chan -b \$address(\$nick,3)
//timer -o 1 300 //mode \$chan -b \$address(\$nick,6)
//timer -o 1 300 //mode \$chan -b \$address(\$nick,7)
//unset %ban. [ \$+ [ \$nick ] \$+ ] . [ \$+ [ \$chan ] ]
}
}
}

```
To top