Mercurial > hg > openttd
changeset 12014:47c1a32b550d draft
(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
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 24 May 2009 17:49:08 +0000 |
parents | c0e05f81bf93 |
children | f51061a22830 |
files | src/console_cmds.cpp |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -1522,6 +1522,8 @@ 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 @@ return false; } - +#endif /* defined(WITH_ZLIB) */ #endif /* ENABLE_NETWORK */ DEF_CONSOLE_CMD(ConSetting) @@ -1777,7 +1779,11 @@ #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);