That's a fair point. mIRC should probably only load up the window when it receives 321.
That's the bug IMO, not that it shows the window on disconnection.
The opposite, actually.
In fact everyone here seems to be getting the wrong impression of all this. In truth, mIRC already does open up the /list window only if it receives a 321. So that aspect isn't broken. What I believe to be a bug is the fact that mIRC also
opens up the /list window if you disconnect and it hasn't yet
received a 321.
Let me try to explain the bug this way.....
mIRC already behaves in all the following ways (which I agree with):* If you type /list, and then if the server sends 321 followed immediately by 323 (indicating 0 channels), then yes, the /list window should open showing 0 channels.
and* If you type /list, and then if the server sends 321, and then if you disconnect before any 322s (channel listings) can arrive, then yes, the /list window should open showing 0 channels.
and* If you type /list, and then if the server sends 321, and then if the server starts sending 322s, and if you then disconnect before 323 arrives, then yes, the /list window should open and show the partial channel list you did get before you disconnected.
Again, mIRC already does everything above, and I cocnsider all three above examples correct and desirable behavior.
Yet what mIRC also does (what I'm calling a bug) is:* If you type /list, and if the server never sends a 321, then the /list window opens up showing 0 channels when you disconnect
That's bad. The reason it's bad is because it gives you the impression the server has 0 channels, when in fact, the server never even got as far as telling you what channels were available, including the possibility of 0 channels
So I think that if someone types /list, and if the connection is dropped/lost before the server's 321 arrives, then what mIRC ought to do is NOT open the /list window, and instead print a status window message like "* /list: server connection terminated before any channel listings data could be received".
P.S. Servers only send 322s (channel listings) and 323 ("end of channel list") after a 321. So yes, this means that mIRC can treat the fact that 321 hasn't yet arrived when a disconnection occurs as proof that not only were no channel listings received, but that even confirmation of 0 channels wasn't received. Hence making it logical for mIRC to not to open the /list window in this case, and to instead just display a status window error.