diff options
author | Darkvater <Darkvater@openttd.org> | 2005-05-28 18:47:05 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2005-05-28 18:47:05 +0000 |
commit | 249a0b6fda2428f3fc9add222e17d369d08a62e9 (patch) | |
tree | 64626f879581564f38933f9c6e68692807e161c7 | |
parent | c9b23c057177c87ccf646bcb2caabd7a821817d0 (diff) | |
download | openttd-249a0b6fda2428f3fc9add222e17d369d08a62e9.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.c | 2 | ||||
-rw-r--r-- | scripts/pre_dedicated.scr.example | 4 |
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 |