I did not quite understand the question due to the complexity of the translation or incorrect formulation wording of the question. The script records each user separately, according to his ip address, and if he exceeds the limit on the frequency of joins for the specified time in seconds, he will receive a kick + ban.

If you want to be able to select custom address masks for ban by type "nick!ident@host" to be set, then the following script is suitable for you:
alias jflood {
  .hadd -m jf join-max 2
  .hadd -m jf time-max 3
  .hadd -m jf kick-text Stop Join Flood!
  ;# Type 1 = nick!ident@host
  ;# Type 2 = nick!*@host
  ;# Type 3 = *!ident@host
  ;# Type 4 = nick!*@*
  ;# Type 5 = *!ident@*
  ;# Type 6 = *!*@host
  ;# Type 7 = *!*@subnet*
  .hadd -m jf type-ban 7
on *:JOIN:#:{
  jflood | var %jf_chan $+(jfchan-,$chan) | var %jf_nick $+(jfnick-,$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 | .hadd -m %jf_nick %jf_ip $nick }
  .echo $chan 04JFLOOD: >>> $hget(%jf_nick,%jf_ip) $+($chr(40),%jf_ip,$chr(41)) = $+(04,$hget(%jf_chan,%jf_ip))
  if ($hget(%jf_chan,%jf_ip) >= $hget(jf,join-max)) {
    if ($hget(jf,type-ban) == 1) .mode $chan +b $address($hget(%jf_nick,%jf_ip),5)
    if ($hget(jf,type-ban) == 2) .mode $chan +b $address($hget(%jf_nick,%jf_ip),7)
    if ($hget(jf,type-ban) == 3) .mode $chan +b $address($hget(%jf_nick,%jf_ip),0)
    if ($hget(jf,type-ban) == 4) .mode $chan +b $+($hget(%jf_nick,%jf_ip),!*@*)
    if ($hget(jf,type-ban) == 5) .mode $chan +b $+($gettok($address($hget(%jf_nick,%jf_ip),1),1,64),@*)
    if ($hget(jf,type-ban) == 6) .mode $chan +b $address($hget(%jf_nick,%jf_ip),2)
    if ($hget(jf,type-ban) == 7) .mode $chan +b $+(*!*@,$gettok(%jf_ip,1-2,46),.*)
    .kick $chan $hget(%jf_nick,%jf_ip) $hget(jf,kick-text)
    .hdel -sw %jf_chan %jf_ip

If necessary, you can change these data values โ€‹โ€‹according to your preference in the "jflood" alias, as this should work for you:

join-max 2 - this is the maximum number of possible joins per channel of one user before it is baned.
time-max 3 - this is the maximum time in seconds during which the user can get banned if he violates the limit on the number of joins.
type-ban 7 - this is number the type for the mask ban, which will be set when the joins limit is exceeded.

With these settings, the script will ban the user who will execute the 2 joins or more times within 3 seconds.

๐ŸŒ http://forum.epicnet.ru ๐Ÿ“œ irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples