Why can't you just do the following:

/join -x #channel
/join -n #Channel

This way, when you send the first /join command, mIRC opens the window maximised. Now, when you send a second /join command and you are already in the channel, mIRC simply switches to that channel window.

Can't test it because I'm not able to connect to a server, BUT, I did try it on custom windows...

/window -x @Test
/window -n @Test


and if I am in @Test window while it is maximised, and type /window -n @Test, it minimises...

Worth a try...


Aubs.
cool