debugged it a bit after recomandations of maroon

Code

NSearch {
  if ($len($1) == 1 && $1 == *) { halt }
  var %o,%i = 1
  while ($nick(#,%i,r)) {
    if ( $1 iswm $v1) {
      %o = $addtok(%o,$v2,32)
    }
    inc %i
  }
  if (%o) {
    while %o {
      echo #  $regsubex($gettok(%o,1-50,32), /(\S+)/g, $+(04,$chr(44),00,$chr(32),$chr(40))\n$chr(41) $+(12,$chr(44),00)\t)   
      %o = $deltok(%o,1-50,32)
    }
  }
}
 

it only outputs the found nicks with 1 to 50 then it starts again with 1 to 50 for the next 50 while we wanted it to continue with 51 and so forth maroon gave me some tips on irc but i couldnt figure it out