i was messing with this code for a while to get identical nicks on join but the loops seem messed up and i cant seem to be able to fix properly
the idea is to store nicks on join and if more than 2 or more identical nicks join to get the stored nicks and check against the patern meaning the first 5 chars of the nick that triggered
the code

Code

On !^*:JOIN:#: {
  if ($nick(#,$me,@&~%) || o isin $usermode) {  
    var %clonednicks.flood = $left($nick,5)

    set -u30 %clnicks1 $addtok(%clnicks1,$nick,44) 

    if (%clonesjoin. [ $+ [ # ] $+ . $+ [ %clonednicks.flood ] ] == $null) {
      set -u3 %clonesjoin. [ $+ [ # ] $+ . $+ [ %clonednicks.flood ] ] 1       
    }
    else { inc %clonesjoin. [ $+ [ # ] $+ . $+ [ %clonednicks.flood ] ] }
    if (%clonesjoin. [ $+ [ # ] $+ . $+ [ %clonednicks.flood ] ] > 1) {



      var %axel = 1  |  while ($gettok(%clnicks1,%axel,44)) {  if (%clonednicks.flood isin $gettok(%clnicks1,%axel,44))  {  set -u30 %clnicks2 $addtok(%clnicks2,$gettok(%clnicks1,%axel,44),44)   }  |  inc %axel   } 



      if (%modechan1MR != $true) { .raw mode  $chan +MRb  $+(%clonednicks.flood,*!*@*) |  echo $chan 01,08 ( cloned nicks Flood ) !!!!! Channel Locked !!!!!   | set -u15 %modechan1MR $true | .timermjs1RM 1 30 mode $safe2018($chan) -MR  }

      if ($nick(#,$me,@%&~) || o isin $usermode) { var %mcln 20 | while (%clnicks2) { kick $chan $gettok(%clnicks2,1- %mcln,44) Cloned Nicks )  Detected | %clnicks2 = $deltok(%clnick2 } }

    }
  }  
}



the idea is to have something like this as end result :