Chat Connecting to Wrong IP

Posted by Flannel on Mon 21 Apr 2003 02:03 AM — 7 posts, 18,430 views.

USA #0
Nick, I was making a seperate world for chatstuff today, when I ran into this problem:

#call XXX.XXX.XXX.XXX 4050
<CHAT> Calling chat server at 127.0.0.1 port 4050
<CHAT> Session established to XXX.XXX.XXX.XXX.
<CHAT> Incoming chat call
<CHAT> Accepted call from 127.0.0.1 port 1085
<CHAT> Chat session accepted, user: "Flannel"
<CHAT> Chat session accepted, user: "Flannel"


When I go back to my original work however, I can connect to the IP fine.

So, I have absolutely NO idea on this...

Also, When I try in my second world, to connect to him, while my first world is connected, my second world just connects to my first...

Im lost.
Australia Forum Administrator #1
Are you saying that the IP address you have X'ed out is not your own PC? It is a different PC, not just another world on the same PC?
Australia Forum Administrator #2
OK, found it. See the release notes, which I reproduce the relevant point here:

Quote:

14. Fixed bug where when you did a chat "#call" and your world's IP address was specified as a dotted-decimal number (eg. 123.56.67.89) then the chat call would call the MUD and not the address you specified. What was happening was that if domain-name resolution was not necessary it was using the world's IP address (ie. the MUD address), not the chat server's address.



As a work-around, make the world's IP address something that has to be looked up (eg. mydomain.com, not 127.0.0.1). That will force the chat routine to use domain-name lookup, which will then use the correct address. I had tested going to different PCs, but my world's IP address was a domain name, not a number.

Fixed in 3.39.
Amended on Mon 21 Apr 2003 03:39 AM by Nick Gammon
USA #3
alright, thanks Nick. No, those X's were some other IP (X'd for security).

Any idea why it would do it in one world, and not the other?

Even at the same time, when I would try and request, it would connect to the 127.0.0.1 again. But the original World could connect just fine...
Australia Forum Administrator #4
World A, which works, has as the MUD IP address a domain name, eg. smaug.org

World B, which doesn't work, has as the MUD IP address a dotted decimal address, eg. 127.0.0.1

That is the difference, the world IP address format.
Amended on Tue 20 Nov 2007 04:13 AM by Nick Gammon
USA #5
Ah, Gotcha. So, you really DID mean the world's IP, I just thought you were confused ;)

Thanks for clearing that up... What would be the name for a self reference? (equivalent to 127.0.0.1?)
Australia Forum Administrator #6
That was the bug - because I copied and pasted the code, I accidentally left in the world IP address rather than the chat IP address. However once it decided to do domain name resolution, the correct address was there, or it would never have worked for me.

To answer your other question: "localhost"