If you close mIRC properly with the Script Editor open it will give you the option of saving changes.

What's the result of $mircdir?