If I understand your post correctly, you assume that mIRC has or can have this information easily, and simply is not saving and/or exposing it right now. I believe that assumption is incorrect: in the cases you describe, mIRC also does not have any ability to know your own full address, without basically implementing what you describe as the way to script this.