; Join flood protect script by Phil
; Bans user after X joins in Y seconds
on *:JOIN:#channel: { ; Set channel name here
; First join we're recording
if ($hget(joinfloodhash, $nick) == $null) {
hadd -m joinfloodhash $nick 1
}
; Already recorded
else {
hinc joinfloodhash $nick
}
; Run timer to decrease value
.timer 1 10 joinflooddec $nick ; Set Y here (currently 10)
; User has joined 3 times
if ($hget(joinfloodhash, $nick) >= 3) { ; Set X here (currently 3)
mode $chan +b $address($nick, 2)
}
}
alias joinflooddec {
hdec joinfloodhash $1
; If count is 0, delete the record
if ($hget(joinfloodhash, $nick) <= 0) {
hdel joinfloodhash $nick
}
}