Only took a brief look but this appears to be the problem:
Code:
didtok Whois 2 32 %nicks
...
if $numtok(%nicks,32) > 1 {
  didtok Whois 2 32 $gettok(%nicks,2-,32)
}


Spelling mistakes, grammatical errors, and stupid comments are intentional.