among many other things, the output from whois appears in a raw numeric event. different networks have different numerics included in their output, some lines you see only on yourself, some appear only if someone is marked as /away, some are seen only by server admins, etc.

This should show a lot of red lines mixed in with the whois output, so you can see which lines are caused by which numeric. You'll also see that the whois reply you do see has often been rearranged from what's received, and some things are dropped or re-formatted. As with many messages sent to you through raw's, there's often a numeric for the beginning of the whois, and another numeric to signal the end of that person's whois.

FYI: you often get a different reply for the 'idle' line using "whois nick nick" vs "whois nick", depending on whether you both share the same server.

Try putting this line in a script to see the raw events where you would need to harvest your data. You would need to have checks like

if ($numeric == 1234) { do stuff }

Code:
raw *:*:{ echo 4 -s debug raw: nick $nick raw $numeric : (1) $1 (2) $2 (3) $3 (4) $4 (5) $5 (6-) $6- }


And yes, Talon, I saw your regex for dynamic numbers, but wanted to keep it simple.