#Author : SanitariuM @ Undernet / small modifications from Sebastien @ undernet
#Download Link : http://pastebin.com/PjF78nXj
#Description :
#When triggered, it will activate silence for 3 minutes.
#If you are flooded offline during this time, you will activate silence upon reconnection.
; Private Flood Protection by SanitariuM/SeeknDestroy
; This script protects against ALL types of private IRC floods :
; Query, Notice, Invite, CTCP, and DCC Send/Chat/Fserve thru IRC Server & IP
; The same settings apply to all of them. 5 in 5 seconds.
on *:connect:{
if ($hget(p_flood,reconnect.protect)) {
echo -as You were flooded offline. Silence will be turned on in 3 seconds.
echo -as You will need to type /silence -* to turn it off when you feel it is safe.
if ($network == undernet) { .timersilence 1 3 silence +*,~*!*@*undernet.org }
else { .timersilence 1 3 silence +* }
}
}
on ^1:notice:*:?:{
if (!$istok(chanserv nickserv memoserv helpserv x,$nick,32)) {
hinc -mu5 p.flood notice 1
if ($hget(p.flood,notice) == 5) { p.flood.silence Notice }
elseif ($hget(p.flood,notice) > 5) { halt }
}
}
on ^1:invite:#:{
hinc -mu5 p.flood invite 1
if ($hget(p.flood,invite) == 5) { p.flood.silence Invite }
elseif ($hget(p.flood,invite) > 5) { halt }
}
on ^1:open:?:*:{
hinc -mu5 p.flood query 1
if ($hget(p.flood,query) == 5) { p.flood.silence Query | close -m }
elseif ($hget(p.flood,query) > 5) { halt }
}
on ^1:open:=:{
hinc -mu5 p.flood chat 1
if ($hget(p.flood,chat) == 5) { p.flood.silence DCC Chat }
elseif ($hget(p.flood,chat) > 5) { halt }
}
on ^1:open:!:{
hinc -mu5 p.flood fserve 1
if ($hget(p.flood,fserve) == 5) { p.flood.silence DCC Fserve }
elseif ($hget(p.flood,fserve) > 5) { halt }
}
ctcp ^1:send:?:{
hinc -mu5 p.flood send 1
if ($hget(p.flood,send) == 5) { p.flood.silence DCC Send }
elseif ($hget(p.flood,send) > 5) { halt }
}
ctcp ^1:*:?:{
hinc -mu5 p.flood ctcp 1
if ($hget(p.flood,ctcp) == 5) { p.flood.silence CTCP }
elseif ($hget(p.flood,ctcp) > 5) { halt }
}
on 1:dccserver:chat:{
hinc -mu5 p.flood dcc.chat 1
if ($hget(p.flood,dcc.chat) == 5) { p.flood.dcc Chat }
}
on 1:dccserver:send:{
hinc -mu5 p.flood dcc.send 1
if ($hget(p.flood,dcc.send) == 5) { p.flood.dcc Send }
}
on 1:dccserver:fserve:{
hinc -mu5 p.flood dcc.fserve 1
if ($hget(p.flood,dcc.fserve) == 5) { p.flood.dcc Fserve }
}
alias p.flood.silence {
if ($network == undernet) { silence +*,~*!*@*undernet.org }
else { silence +* }
.timerunsilence 1 180 silence -*
echo -as $1- Flood Detected. Silencing for 3 minutes.
hadd -mu60 p.flood reconnect.protect 1
}
alias p.flood.dcc {
dccserver off | .timerdccon 1 180 dccserver on
echo -as DCC (via IP) $1 Flood Detected. Disabling DCC for 3 minutes.
}
Comments