Then try this version of the script. You can uncomment or comment out the desired line with the ";" symbol, - the line in which the ban is placed using the channel mode.

.mode $chan +b $+(*!*@,%jf_ip)
.mode $chan +b $+(*!*@,$gettok(%jf_ip,1-2,46),.*)

Turn on one of the lines depending on your preference to set an easy or harder ban.

alias jflood {
  .hadd -m jf join-max 2
  .hadd -m jf time-max 4
  .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)) {
    ;# ban only one ip
    ;.mode $chan +b $+(*!*@,%jf_ip)
    ;# ban subnet ip
    .mode $chan +b $+(*!*@,$gettok(%jf_ip,1-2,46),.*)
    .kick $chan $nick $hget(jf,kick-text)
    .hdel -sw %jf_chan %jf_ip

🌐 📜 6667 #Code | mIRC scripts, help, discuss, examples