mIRC Homepage
Posted By: Masoud Expanding $ip - 31/03/15 10:04 PM
mIRC only gives you the last resolved IP address, and I think this must be a connection associated identifier. ($scid($activecid).ip doesn't work either.)


$ip: Returns the last resolved IP address. (This will maintain the backward compatibility.)
$ip(ConnectionID): returns the IP address that was resolved when you connected to the server with the given connection ID.


The reason I think this should be implemented is that when you connect to (for instance) a local server, mIRC will only give you 127.0.0.1/localhost where it should not do that.


Not sure why this hasn't been added before, hope to see this in next versions.
Posted By: Raccoon Re: Expanding $ip - 31/03/15 11:39 PM
I would report this as a bug.

You are correct, $ip appears to be returning the most recent internal call to /localinfo [-h|-u], the -h or -u variation is chosen based on your setting in Options > Connect > Local > 'Lookup method' > ( ) Normal / (x) Server

$ip is being set as a global value instead of a server-specific value associated with $cid. I would move this as a Bug Report, expecting that $scid(N).ip or $scon(N).ip returns the value retrieved from that given connection instance.
© mIRC Discussion Forums