mIRC Homepage
Posted By: SergioNL $serverip bug?? - 10/12/02 12:21 AM
dunno if its a bug but if i do

//echo -a $serverip
it returns the ip of the server sorta backwards

if the ip is 123.321.245.0 for real the $serverip returns 0.245.321.123 , it did the same on several ppl his pc's, asked a few to test it
Posted By: Starfox Re: $serverip bug?? - 10/12/02 12:28 AM
What OS? mIRC version? Sounds like a missing ntoh().
Posted By: SergioNL Re: $serverip bug?? - 10/12/02 12:44 AM
Windows XP pro company edittion
with mIRC 6.03
Posted By: zack Re: $serverip bug?? - 10/12/02 12:46 AM
I am not quite sure how mIRC retrieves the IP of the server (dns?) but your server might be reverse resolving, to sort of mask their IP, have you tried it on other servers? Because I haven't heard much about this issue on DALnet.
Posted By: Starfox Re: $serverip bug?? - 10/12/02 12:48 AM
It would also help if you could provide the IP of the server as well. Obviously, 123.321.245.0 is not a valid IP address.
Posted By: SergioNL Re: $serverip bug?? - 10/12/02 12:58 AM
lol that ip wasnt a real ip, was just for an example, forgot to mention that sorry:)

i tried it on 2 servers, both did the same
Posted By: Dream_WEaver Re: $serverip bug?? - 10/12/02 01:03 AM
I get the same thing with version 6.03.
My undernet Server's IP is 216.152.77.10

//echo -a $serverip
10.77.152.216
Posted By: Strider Re: $serverip bug?? - 10/12/02 01:08 AM
Yes, it is a bug which was reported the first or second day the latest version was released, but since everything got destroyed, you might not know that.

You can always use

alias serveripfix {
if (!$isid) { halt }
return $+($gettok($serverip,4,46),$chr(46),$gettok($serverip,3,46),$chr(46),$gettok($serverip,2,46),$chr(46),$gettok($serverip,1,46))
}
Posted By: NaquadaServ Re: $serverip bug?? - 12/12/02 06:35 AM
Yup, Someone posted this before everything got destroyed.... The Author's name is unknown, Sorry...

Way cleaner IMHO...

; To fix a bug in mIRC 6.03
sip { tokenize 46 $serverip | return $+($4.,$3.,$2.,$1) }

© mIRC Discussion Forums