i have been using this alias for a while wich outputs all regular nicks in a channel with spaces and wanted to have output nicks seperated with comma instead of space i have been messing with it for a while but couldnt get it to work as desired perhaps somebody has an idea how to edit this:

Code

alias 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 %CurrentVal
    }
    inc %x
  }
  var %x = 0 , %y = $var(%ListK.*,0).local
  while (%x < %y) {
    inc %x
    echo # $sorttok($var(%ListK.*,%x).value,32)  
  }
}




Much apreciated,