summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-05-28 18:47:05 +0000
committerDarkvater <darkvater@openttd.org>2005-05-28 18:47:05 +0000
commitacef413f003118bbe693cc211fca6b7aec12858e (patch)
tree64626f879581564f38933f9c6e68692807e161c7
parentdf4c22e3583f16a2715960e52b2fd7d262b7f86e (diff)
downloadopenttd-acef413f003118bbe693cc211fca6b7aec12858e.tar.xz
(svn r2374) - CodeChange: giving server_ip a value of 'all' will make the server listen on any interface (0.0.0.0); also fix a typo in one of the script example files: s/ports/interfaces
-rw-r--r--console_cmds.c2
-rw-r--r--scripts/pre_dedicated.scr.example4
2 files changed, 3 insertions, 3 deletions
diff --git a/console_cmds.c b/console_cmds.c
index 27f7a5210..cad9e3357 100644
--- a/console_cmds.c
+++ b/console_cmds.c
@@ -1136,7 +1136,7 @@ DEF_CONSOLE_CMD(ConProcServerIP)
if (argc != 1) return false;
- _network_server_bind_ip = inet_addr(argv[0]);
+ _network_server_bind_ip = (strcmp(argv[0], "all") == 0) ? inet_addr("0.0.0.0") : inet_addr(argv[0]);
snprintf(_network_server_bind_ip_host, sizeof(_network_server_bind_ip_host), "%s", inet_ntoa(*(struct in_addr *)&_network_server_bind_ip));
IConsolePrintF(_icolour_warn, "'server_ip' changed to: %s", inet_ntoa(*(struct in_addr *)&_network_server_bind_ip));
return true;
diff --git a/scripts/pre_dedicated.scr.example b/scripts/pre_dedicated.scr.example
index f915ba2b7..b41ca51d2 100644
--- a/scripts/pre_dedicated.scr.example
+++ b/scripts/pre_dedicated.scr.example
@@ -1,3 +1,3 @@
-# set default server port, and have the dedicated server listen on all ports
-server_ip = 0.0.0.0
+# set default server port, and have the dedicated server listen on all interfaces
+server_ip = all
server_port = 3979