Do the whois then get the incoming informations from the right raw you need.
311 - ident, uhost and realname
319 - channels where the user is sitting (the channels that are not hidden)
312 - server and it's description
317 - seconds idle and signon time
Also, do a forum search because there had been discussed before about the whois thing.
Once the game is over, the king and the pawn go back in the same box.