Having a problem editing the output of a whois and whowas script currently..

It is the whowas (.lastid) i am having issues with. with the .msg #ops .. it outputs fine.. But with a large whowas.. i dont want it to flood the channel..

I have tried to swap .msg #ops to .msg $nick but no pm opens to the user issuing the command!
for the moment i have commented out the command to remove it from the ops menu of commands

Looking for a fix please.. and a limit to just 10 results being outputted. The bot is running mirc 7.55. and its unrealircd version 4.2.4.1

Code
raw 311:*: {
  .msg #ops $2 $+ 's whois ID: $+($3,@,$4) and Real Name is: $6- | halt
}
raw 314:*: {
  ;.msg #ops $2 $+ 's whowas ID: $+($3,@,$4) and Real Name was: $6- | halt
  ;.msg $nick $2 $+ 's whowas ID: $+($3,@,$4) and Real Name was: $6- | halt
}
on *:text:*:#ops: {
  if ($nick isop $chan) && ($regex($1-,/(^|\s)(.idshow?w?s?\s\S+)/i)) {
    tokenize 32 $regml(2) | whois $2
  }
  if ($nick isop $chan) && ($regex($1-,/(^|\s)(.lastid?d?s?\s\S+)/i)) {
    tokenize 32 $regml(2) | whowas $2
  }
}