summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-24 17:49:08 +0000
committerrubidium <rubidium@openttd.org>2009-05-24 17:49:08 +0000
commit36e71c8df6fe1f4c303d98b609bb9cdd0c4b7e75 (patch)
tree506ce0461536625e76166b4ca15f631226269dad
parent4033f786bdea696ae04811cfbe930eca4f9bcf40 (diff)
downloadopenttd-36e71c8df6fe1f4c303d98b609bb9cdd0c4b7e75.tar.xz
(svn r16420) -Fix [FS#2919]: don't allow content download via the console when there's no zlib as it's done for the GUI already
-rw-r--r--src/console_cmds.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 2695155d1..6709f5f1f 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -1522,6 +1522,8 @@ bool NetworkChangeCompanyPassword(byte argc, char *argv[])
return true;
}
+/* Content downloading only is available with ZLIB */
+#if defined(WITH_ZLIB)
#include "network/network_content.h"
/** Resolve a string to a content type. */
@@ -1630,7 +1632,7 @@ DEF_CONSOLE_CMD(ConContent)
return false;
}
-
+#endif /* defined(WITH_ZLIB) */
#endif /* ENABLE_NETWORK */
DEF_CONSOLE_CMD(ConSetting)
@@ -1777,7 +1779,11 @@ void IConsoleStdLibRegister()
#ifdef ENABLE_NETWORK
/* Network hooks; only active in network */
IConsoleCmdHookAdd ("resetengines", ICONSOLE_HOOK_ACCESS, ConHookNoNetwork);
+
+/* Content downloading is only available with ZLIB */
+#if defined(WITH_ZLIB)
IConsoleCmdRegister("content", ConContent);
+#endif /* defined(WITH_ZLIB) */
/*** Networking commands ***/
IConsoleCmdRegister("say", ConSay);