diff options
author | truelight <truelight@openttd.org> | 2004-12-13 16:16:28 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-12-13 16:16:28 +0000 |
commit | e7886b6a34c61f3d55636c1445d189d31694dd7c (patch) | |
tree | 751450b04e62621a18d3049896ad026acf6e90b5 /console_cmds.c | |
parent | 25dfbc3134dc722989595e169c5054b8f494459e (diff) | |
download | openttd-e7886b6a34c61f3d55636c1445d189d31694dd7c.tar.xz |
(svn r1055) -Add: [Console] Special for dedicated servers:
- You can change patch settings via 'set patch <patch_name> [<value>]'
Diffstat (limited to 'console_cmds.c')
-rw-r--r-- | console_cmds.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/console_cmds.c b/console_cmds.c index 8dc46dd1d..5891986fb 100644 --- a/console_cmds.c +++ b/console_cmds.c @@ -552,7 +552,6 @@ DEF_CONSOLE_CMD(ConSayClient) /* the "set" command */ /* **************************** */ - DEF_CONSOLE_CMD(ConSet) { if (argc < 2) { IConsolePrint(_iconsole_color_warning, "Unknonw usage. Usage: set [setting] [value]."); @@ -657,6 +656,22 @@ DEF_CONSOLE_CMD(ConSet) { #endif + // Patch-options + if (strcmp(argv[1],"patch") == 0) { + if (_networking && !_network_server) { + IConsolePrintF(_iconsole_color_error, "You are not the server"); + return NULL; + } + if (argc == 3) + ConsoleGetPatchSetting(argv[2]); + else if (argc == 4) + ConsoleSetPatchSetting(argv[2], argv[3]); + else + IConsolePrint(_iconsole_color_warning, "Usage: set patch <patch_name> [<value>]."); + return NULL; + } + + IConsolePrintF(_iconsole_color_error,"Unknown setting"); return NULL; |