|
|
@ -106,6 +106,8 @@ DEF_CONSOLE_HOOK(ConHookNoNetwork)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
# define ConHookNoNetwork NULL
|
|
|
|
#endif /* ENABLE_NETWORK */
|
|
|
|
#endif /* ENABLE_NETWORK */
|
|
|
|
|
|
|
|
|
|
|
|
static void IConsoleHelp(const char *str)
|
|
|
|
static void IConsoleHelp(const char *str)
|
|
|
@ -1263,9 +1265,7 @@ DEF_CONSOLE_CMD(ConInfoCmd)
|
|
|
|
IConsolePrintF(CC_DEFAULT, "command name: %s", cmd->name);
|
|
|
|
IConsolePrintF(CC_DEFAULT, "command name: %s", cmd->name);
|
|
|
|
IConsolePrintF(CC_DEFAULT, "command proc: %p", cmd->proc);
|
|
|
|
IConsolePrintF(CC_DEFAULT, "command proc: %p", cmd->proc);
|
|
|
|
|
|
|
|
|
|
|
|
if (cmd->hook.access) IConsoleWarning("command is access hooked");
|
|
|
|
if (cmd->hook != NULL) IConsoleWarning("command is hooked");
|
|
|
|
if (cmd->hook.pre) IConsoleWarning("command is pre hooked");
|
|
|
|
|
|
|
|
if (cmd->hook.post) IConsoleWarning("command is post hooked");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1721,7 +1721,7 @@ void IConsoleStdLibRegister()
|
|
|
|
IConsoleCmdRegister("getseed", ConGetSeed);
|
|
|
|
IConsoleCmdRegister("getseed", ConGetSeed);
|
|
|
|
IConsoleCmdRegister("getdate", ConGetDate);
|
|
|
|
IConsoleCmdRegister("getdate", ConGetDate);
|
|
|
|
IConsoleCmdRegister("quit", ConExit);
|
|
|
|
IConsoleCmdRegister("quit", ConExit);
|
|
|
|
IConsoleCmdRegister("resetengines", ConResetEngines);
|
|
|
|
IConsoleCmdRegister("resetengines", ConResetEngines, ConHookNoNetwork);
|
|
|
|
IConsoleCmdRegister("return", ConReturn);
|
|
|
|
IConsoleCmdRegister("return", ConReturn);
|
|
|
|
IConsoleCmdRegister("screenshot", ConScreenShot);
|
|
|
|
IConsoleCmdRegister("screenshot", ConScreenShot);
|
|
|
|
IConsoleCmdRegister("script", ConScript);
|
|
|
|
IConsoleCmdRegister("script", ConScript);
|
|
|
@ -1761,66 +1761,42 @@ void IConsoleStdLibRegister()
|
|
|
|
|
|
|
|
|
|
|
|
/* networking functions */
|
|
|
|
/* networking functions */
|
|
|
|
#ifdef ENABLE_NETWORK
|
|
|
|
#ifdef ENABLE_NETWORK
|
|
|
|
/* Network hooks; only active in network */
|
|
|
|
|
|
|
|
IConsoleCmdHookAdd ("resetengines", ICONSOLE_HOOK_ACCESS, ConHookNoNetwork);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Content downloading is only available with ZLIB */
|
|
|
|
/* Content downloading is only available with ZLIB */
|
|
|
|
#if defined(WITH_ZLIB)
|
|
|
|
#if defined(WITH_ZLIB)
|
|
|
|
IConsoleCmdRegister("content", ConContent);
|
|
|
|
IConsoleCmdRegister("content", ConContent);
|
|
|
|
#endif /* defined(WITH_ZLIB) */
|
|
|
|
#endif /* defined(WITH_ZLIB) */
|
|
|
|
|
|
|
|
|
|
|
|
/*** Networking commands ***/
|
|
|
|
/*** Networking commands ***/
|
|
|
|
IConsoleCmdRegister("say", ConSay);
|
|
|
|
IConsoleCmdRegister("say", ConSay, ConHookNeedNetwork);
|
|
|
|
IConsoleCmdHookAdd("say", ICONSOLE_HOOK_ACCESS, ConHookNeedNetwork);
|
|
|
|
IConsoleCmdRegister("companies", ConCompanies, ConHookServerOnly);
|
|
|
|
IConsoleCmdRegister("companies", ConCompanies);
|
|
|
|
|
|
|
|
IConsoleCmdHookAdd("companies", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
|
|
|
|
|
|
|
|
IConsoleAliasRegister("players", "companies");
|
|
|
|
IConsoleAliasRegister("players", "companies");
|
|
|
|
IConsoleCmdRegister("say_company", ConSayCompany);
|
|
|
|
IConsoleCmdRegister("say_company", ConSayCompany, ConHookNeedNetwork);
|
|
|
|
IConsoleCmdHookAdd("say_company", ICONSOLE_HOOK_ACCESS, ConHookNeedNetwork);
|
|
|
|
|
|
|
|
IConsoleAliasRegister("say_player", "say_company %+");
|
|
|
|
IConsoleAliasRegister("say_player", "say_company %+");
|
|
|
|
IConsoleCmdRegister("say_client", ConSayClient);
|
|
|
|
IConsoleCmdRegister("say_client", ConSayClient, ConHookNeedNetwork);
|
|
|
|
IConsoleCmdHookAdd("say_client", ICONSOLE_HOOK_ACCESS, ConHookNeedNetwork);
|
|
|
|
|
|
|
|
|
|
|
|
IConsoleCmdRegister("connect", ConNetworkConnect, ConHookClientOnly);
|
|
|
|
IConsoleCmdRegister("connect", ConNetworkConnect);
|
|
|
|
IConsoleCmdRegister("clients", ConNetworkClients, ConHookNeedNetwork);
|
|
|
|
IConsoleCmdHookAdd("connect", ICONSOLE_HOOK_ACCESS, ConHookClientOnly);
|
|
|
|
IConsoleCmdRegister("status", ConStatus, ConHookServerOnly);
|
|
|
|
IConsoleCmdRegister("clients", ConNetworkClients);
|
|
|
|
IConsoleCmdRegister("server_info", ConServerInfo, ConHookServerOnly);
|
|
|
|
IConsoleCmdHookAdd("clients", ICONSOLE_HOOK_ACCESS, ConHookNeedNetwork);
|
|
|
|
|
|
|
|
IConsoleCmdRegister("status", ConStatus);
|
|
|
|
|
|
|
|
IConsoleCmdHookAdd("status", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
|
|
|
|
|
|
|
|
IConsoleCmdRegister("server_info", ConServerInfo);
|
|
|
|
|
|
|
|
IConsoleCmdHookAdd("server_info", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
|
|
|
|
|
|
|
|
IConsoleAliasRegister("info", "server_info");
|
|
|
|
IConsoleAliasRegister("info", "server_info");
|
|
|
|
IConsoleCmdRegister("reconnect", ConNetworkReconnect);
|
|
|
|
IConsoleCmdRegister("reconnect", ConNetworkReconnect, ConHookClientOnly);
|
|
|
|
IConsoleCmdHookAdd("reconnect", ICONSOLE_HOOK_ACCESS, ConHookClientOnly);
|
|
|
|
IConsoleCmdRegister("rcon", ConRcon, ConHookNeedNetwork);
|
|
|
|
IConsoleCmdRegister("rcon", ConRcon);
|
|
|
|
|
|
|
|
IConsoleCmdHookAdd("rcon", ICONSOLE_HOOK_ACCESS, ConHookNeedNetwork);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IConsoleCmdRegister("join", ConJoinCompany);
|
|
|
|
IConsoleCmdRegister("join", ConJoinCompany, ConHookNeedNetwork);
|
|
|
|
IConsoleCmdHookAdd("join", ICONSOLE_HOOK_ACCESS, ConHookNeedNetwork);
|
|
|
|
|
|
|
|
IConsoleAliasRegister("spectate", "join 255");
|
|
|
|
IConsoleAliasRegister("spectate", "join 255");
|
|
|
|
IConsoleCmdRegister("move", ConMoveClient);
|
|
|
|
IConsoleCmdRegister("move", ConMoveClient, ConHookServerOnly);
|
|
|
|
IConsoleCmdHookAdd("move", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
|
|
|
|
IConsoleCmdRegister("reset_company", ConResetCompany, ConHookServerOnly);
|
|
|
|
IConsoleCmdRegister("reset_company", ConResetCompany);
|
|
|
|
|
|
|
|
IConsoleCmdHookAdd("reset_company", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
|
|
|
|
|
|
|
|
IConsoleAliasRegister("clean_company", "reset_company %A");
|
|
|
|
IConsoleAliasRegister("clean_company", "reset_company %A");
|
|
|
|
IConsoleCmdRegister("client_name", ConClientNickChange);
|
|
|
|
IConsoleCmdRegister("client_name", ConClientNickChange, ConHookServerOnly);
|
|
|
|
IConsoleCmdHookAdd("client_name", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
|
|
|
|
IConsoleCmdRegister("kick", ConKick, ConHookServerOnly);
|
|
|
|
IConsoleCmdRegister("kick", ConKick);
|
|
|
|
IConsoleCmdRegister("ban", ConBan, ConHookServerOnly);
|
|
|
|
IConsoleCmdHookAdd("kick", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
|
|
|
|
IConsoleCmdRegister("unban", ConUnBan, ConHookServerOnly);
|
|
|
|
IConsoleCmdRegister("ban", ConBan);
|
|
|
|
IConsoleCmdRegister("banlist", ConBanList, ConHookServerOnly);
|
|
|
|
IConsoleCmdHookAdd("ban", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
|
|
|
|
|
|
|
|
IConsoleCmdRegister("unban", ConUnBan);
|
|
|
|
IConsoleCmdRegister("pause", ConPauseGame, ConHookServerOnly);
|
|
|
|
IConsoleCmdHookAdd("unban", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
|
|
|
|
IConsoleCmdRegister("unpause", ConUnPauseGame, ConHookServerOnly);
|
|
|
|
IConsoleCmdRegister("banlist", ConBanList);
|
|
|
|
|
|
|
|
IConsoleCmdHookAdd("banlist", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
|
|
|
|
IConsoleCmdRegister("company_pw", ConCompanyPassword, ConHookNeedNetwork);
|
|
|
|
|
|
|
|
|
|
|
|
IConsoleCmdRegister("pause", ConPauseGame);
|
|
|
|
|
|
|
|
IConsoleCmdHookAdd("pause", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
|
|
|
|
|
|
|
|
IConsoleCmdRegister("unpause", ConUnPauseGame);
|
|
|
|
|
|
|
|
IConsoleCmdHookAdd("unpause", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IConsoleCmdRegister("company_pw", ConCompanyPassword);
|
|
|
|
|
|
|
|
IConsoleCmdHookAdd("company_pw", ICONSOLE_HOOK_ACCESS, ConHookNeedNetwork);
|
|
|
|
|
|
|
|
IConsoleAliasRegister("company_password", "company_pw %+");
|
|
|
|
IConsoleAliasRegister("company_password", "company_pw %+");
|
|
|
|
|
|
|
|
|
|
|
|
IConsoleAliasRegister("net_frame_freq", "setting frame_freq %+");
|
|
|
|
IConsoleAliasRegister("net_frame_freq", "setting frame_freq %+");
|
|
|
|