The way mIRC looks up your connection's IP address depends on your settings in the mIRC Options/Connect/Local dialog. The most reliable setting is "On connect, always get: Host name" and "Lookup method: Server", which is the default setting. If that is returning the wrong IP address, this may mean that you are connecting through a proxy or VPN of some kind and are not making a direct connection to the IRC server, or that the IRC server is not returning your actual address in a /userhost reply.

An alternative option is to open the mIRC Options/Connect/Options/Ports dialog and enable the UPnP support options. For this to work, you will need to be using a router that supports UPnP, has UPnP enabled, and you will need to make sure the UPnP support is enabled in Windows.

If none of these methods are available, you will need to set the host name and IP address manually in the mIRC Options/Connect/Local dialog and disable the "Always get" option.