summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-10 12:56:55 +0000
committerrubidium <rubidium@openttd.org>2009-04-10 12:56:55 +0000
commit7d3db3ee91945807c1041789e22e11a9844ec63d (patch)
tree0b5cc992be657457176933996ae1117a96bb2283 /src/openttd.cpp
parentba200c6a92829235d3ef79cf339b6538eb90a0ca (diff)
downloadopenttd-7d3db3ee91945807c1041789e22e11a9844ec63d.tar.xz
(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]
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index be74b3b6e..2d0bf65a9 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -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 */