diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -86,8 +86,6 @@ static ConsoleFileList _console_file_lis * command hooks ****************/ -#ifdef ENABLE_NETWORK - /** * Check network availability and inform in console about failure of detection. * @return Network availability. @@ -159,10 +157,6 @@ DEF_CONSOLE_HOOK(ConHookNoNetwork) return CHR_ALLOW; } -#else -# define ConHookNoNetwork NULL -#endif /* ENABLE_NETWORK */ - DEF_CONSOLE_HOOK(ConHookNewGRFDeveloperTool) { if (_settings_client.gui.newgrf_developer_tools) { @@ -170,11 +164,7 @@ DEF_CONSOLE_HOOK(ConHookNewGRFDeveloperT if (echo) IConsoleError("This command is only available in game and editor."); return CHR_DISALLOW; } -#ifdef ENABLE_NETWORK return ConHookNoNetwork(echo); -#else - return CHR_ALLOW; -#endif } return CHR_HIDE; } @@ -479,7 +469,6 @@ DEF_CONSOLE_CMD(ConClearBuffer) /********************************** * Network Core Console Commands **********************************/ -#ifdef ENABLE_NETWORK static bool ConKickOrBan(const char *argv, bool ban) { @@ -930,8 +919,6 @@ DEF_CONSOLE_CMD(ConNetworkConnect) return true; } -#endif /* ENABLE_NETWORK */ - /********************************* * script file console commands *********************************/ @@ -1547,12 +1534,9 @@ DEF_CONSOLE_CMD(ConCompanies) const char *password_state = ""; if (c->is_ai) { password_state = "AI"; - } -#ifdef ENABLE_NETWORK - else if (_network_server) { + } else if (_network_server) { password_state = StrEmpty(_network_company_states[c->index].password) ? "unprotected" : "protected"; } -#endif char colour[512]; GetString(colour, STR_COLOUR_DARK_BLUE + _company_colours[c->index], lastof(colour)); @@ -1569,8 +1553,6 @@ DEF_CONSOLE_CMD(ConCompanies) return true; } -#ifdef ENABLE_NETWORK - DEF_CONSOLE_CMD(ConSay) { if (argc == 0) { @@ -1812,7 +1794,6 @@ DEF_CONSOLE_CMD(ConContent) return false; } #endif /* defined(WITH_ZLIB) */ -#endif /* ENABLE_NETWORK */ DEF_CONSOLE_CMD(ConSetting) { @@ -1992,7 +1973,7 @@ void IConsoleStdLibRegister() IConsoleAliasRegister("players", "companies"); /* networking functions */ -#ifdef ENABLE_NETWORK + /* Content downloading is only available with ZLIB */ #if defined(WITH_ZLIB) IConsoleCmdRegister("content", ConContent); @@ -2050,7 +2031,6 @@ void IConsoleStdLibRegister() IConsoleAliasRegister("restart_game_year", "setting restart_game_year %+"); IConsoleAliasRegister("min_players", "setting min_active_clients %+"); IConsoleAliasRegister("reload_cfg", "setting reload_cfg %+"); -#endif /* ENABLE_NETWORK */ /* debugging stuff */ #ifdef _DEBUG