thanks wims this is what i have so far and i tested it it doesnt seem to output in stacks of 4 tho and it seems to freeze temporary

Code

nicks {
  var %x = 1 , %index = 1 
  while ($nick(#,%x)) {
    var %nick = $v1 , %CurrentVal = $var($+(%,ListK.,%index),1).value
    if (!$nick(#,$nick(#,%x),@&~%+) && !$regex(%nick,/^((oper|admin|nick|chan|memo)Serv|global| $+ $me $+ )$/i) ) {
      if ($numtok(%CurrentVal,32) >= 4) { var %index = %index + 1 , %CurrentVal = $null }
      set -l $+(%,ListK.,%index) %nick $+ $chr(44) $+ %CurrentVal
    }
    inc %x
  }
  var %x = 0 , %y = $var(%ListK.*,0).local
  while (%x < %y) { 
    inc %x 
    echo # $sorttok($var(%ListK.*,%x).value,44)
  }
}