summaryrefslogtreecommitdiff
path: root/console_cmds.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-15 22:06:47 +0000
committertruelight <truelight@openttd.org>2004-12-15 22:06:47 +0000
commit736718ef53c7c5a3b8536136209668a895901187 (patch)
tree8000323670a9440912acf689a0367c0b97e7b132 /console_cmds.c
parent15265ac40aed92fe46d6a39dd730d0d18ed4789d (diff)
downloadopenttd-736718ef53c7c5a3b8536136209668a895901187.tar.xz
(svn r1116) -Add: [Console] With 'set server_advertise on/off' you can put server
advertise on/off via console (requested by imachine)
Diffstat (limited to 'console_cmds.c')
-rw-r--r--console_cmds.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/console_cmds.c b/console_cmds.c
index 53f8c45ab..1cb33ede1 100644
--- a/console_cmds.c
+++ b/console_cmds.c
@@ -718,6 +718,21 @@ DEF_CONSOLE_CMD(ConSet) {
return NULL;
}
+ // setting the server advertising on/off
+ if (strcmp(argv[1],"server_advertise") == 0) {
+ if (argc == 3) {
+ if (strcmp(argv[2], "on") == 0 || atoi(argv[2]) == 1)
+ _network_advertise = true;
+ else
+ _network_advertise = false;
+ IConsolePrintF(_iconsole_color_warning, "Server-advertise changed to '%s'", (_network_advertise)?"on":"off");
+ } else {
+ IConsolePrintF(_iconsole_color_default, "Current server-advertise is '%s'", (_network_advertise)?"on":"off");
+ IConsolePrint(_iconsole_color_warning, "Usage: set server_advertise on/off.");
+ }
+ return NULL;
+ }
+
#endif /* ENABLE_NETWORK */
// Patch-options
@@ -745,6 +760,7 @@ DEF_CONSOLE_CMD(ConSet) {
IConsolePrint(_iconsole_color_error, " - servername \"<name>\"");
IConsolePrint(_iconsole_color_error, " - server_port <port>");
IConsolePrint(_iconsole_color_error, " - server_bind_ip <ip>");
+ IConsolePrint(_iconsole_color_error, " - server_advertise on/off");
#endif /* ENABLE_NETWORK */
IConsolePrint(_iconsole_color_error, " - patch <patch_name> [<value>]");