1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-20 21:19:10 +00:00

(svn r16014) -Feature(-ish): allow binding to several IPs; [network]:server_bind_ip doesn't exist anymore. Add the IPs/hostnames to [server_bind_addresses]

This commit is contained in:
rubidium
2009-04-10 12:56:55 +00:00
parent ba200c6a92
commit 7d3db3ee91
8 changed files with 35 additions and 11 deletions

View File

@@ -544,7 +544,10 @@ int ttd_main(int argc, char *argv[])
if (_cur_resolution.height <= 0) _cur_resolution.height = 1;
#if defined(ENABLE_NETWORK)
if (dedicated_host) snprintf(_settings_client.network.server_bind_ip, sizeof(_settings_client.network.server_bind_ip), "%s", dedicated_host);
if (dedicated_host) {
_network_bind_list.Clear();
*_network_bind_list.Append() = strdup(dedicated_host);
}
if (dedicated_port) _settings_client.network.server_port = dedicated_port;
if (_dedicated_forks && !dedicated) _dedicated_forks = false;
#endif /* ENABLE_NETWORK */