I didnt knew how to explain this with words, but you can download my demo at
this page.
After you watch it try that few times and you will suceed to the bug Im trying to explain
It doesnt must to work with whois only, it also work for any of the CHAT/QUERY popups
I have found this bug since mIRC 6.03, I've expected it to be fixed in 6.1 but probably its not.