alias jflood {
.hadd -m jf join-max 3
.hadd -m jf time-max 5
.hadd -m jf kick-text Stop Join Flood!
}
on *:JOIN:#:{
jflood | var %jf_chan $+(jfchan-,$chan) | var %jf_ip $gettok($address($nick,5),2,64)
if ($hget(%jf_chan,%jf_ip)) .hinc -m %jf_chan %jf_ip 1
if (!$hget(%jf_chan,%jf_ip)) .hadd -mu $+ $hget(jf,time-max) %jf_chan %jf_ip 1
.echo $chan 04JFLOOD: >>> %jf_ip = $+(04,$hget(%jf_chan,%jf_ip))
if ($hget(%jf_chan,%jf_ip) >= $hget(jf,join-max)) {
.mode $chan +b $+(*!*@,%jf_ip)
.kick $chan $nick $hget(jf,kick-text)
.hdel -sw %jf_chan %jf_ip
}
}