ehm.. i think it's obvious that parting a channel isn't even by far related to exiting mIRC..
The event that triggers when you exit mIRC is
on *:EXIT: