View Single Post
  #30  
Old 10-02-2002, 09:29 AM
btuch
Sarnak
 
Join Date: Sep 2002
Posts: 81
Default

I think I found the area to put TheCoder's patch into the 0.3.8 release...

In the file ~/world/console.cpp for the line:

address.sin_addr.s_addr = htonl(INADDR_ANY);

and put a // in front of it.

Then below that line paste the lines (without the --snip--):

--snip--
// bind only to the address specified as the world address
hostent* bindaddr = gethostbyname(net.GetWorldAddress());

if (bindaddr != NULL)
{
#ifdef WIN32
memcpy ((char FAR *)&(address.sin_addr), bindaddr->h_addr, bindaddr->h_length);
#else
memcpy ((char*)&(address.sin_addr), bindaddr->h_addr, bindaddr->h_length);
#endif
}
else
{
// could not resolve world address... bind to all interfaces then
cout << "Error: could not resolve world address " << net.GetWorldAddress() << endl;
cout << "Listening on INADDR_ANY" << endl;
address.sin_addr.s_addr = htonl(INADDR_ANY);
}
--snip--

I tested this, and the world server will now bind to the IP specified in the LoginServer.ini

The only changes I made were I took out the references to "this->" and added in "net.".

I'll test it when I get home from my internal LAN.

-Brian
Reply With Quote