Doing a /whois on every user in the channel is quite some work to avoid flooding and too unresponsive mIRC.
Some networks allow to do /whois nick1,nick2,nick3 etc.
I wrote something to do this but it's quite complicated, part of a bigger script, and requires alot initial configuration work, it's downloadable from
http://www.hawkee.com/view.php?file_id=1363 or for latest version, http://home.deds.nl/~cq/ServCom/ServCom.zip
- file SC_XIRC.mrc / alias SC_IRC_CheckMassSupport checks if the network supports mass whois.
- file SC_XIRC.mrc / the part under ; IRC / COMMAND QUEUE is a single parameter command queue to irc servers, here used for /whois nick or /whois nick nick (called "special whois")
- file SC_XIRC.mrc / the part under ; IRC / MASS COMMAND QUEUE is the queue that converts a stream whois requests on one nick to a series mass whois commands.
Both queues are processed using a "send command to irc server - wait for response to do next command" technique, with a configurable timeout (to avoid occasional stalls) and delay (to avoid mIRC too unresponsive).
- file SC_XIRCEvents.mrc holds all the events that may be triggered in response to the given commands, in your case ; +++ RAW EVENTS / WHOIS and maybe also under ; +++ RAW EVENTS / SERVER RELATED for server too busy.
I realize this all doesnt help you much directly regarding code, but it may help in the way of knowing the problems and how to deal with them.