Image and the other Devs,
Can you please add this into the world code if possible so the world server only binds to one IP address?
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--
Thanks!
|