mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Hack to disallow admins to enable /r after server was started
This commit is contained in:
parent
c4f615a916
commit
cea6fef24f
|
@ -1678,6 +1678,13 @@ void CServer::ConTestingCommands(CConsole::IResult *pResult, void *pUser)
|
|||
((CConsole*)pUser)->Print(CConsole::OUTPUT_LEVEL_STANDARD, "console", aBuf);
|
||||
}
|
||||
|
||||
void CServer::ConAllowRescue(CConsole::IResult *pResult, void *pUser)
|
||||
{
|
||||
char aBuf[128];
|
||||
str_format(aBuf, sizeof(aBuf), "Value: %d", g_Config.m_SvAllowRescue);
|
||||
((CConsole*)pUser)->Print(CConsole::OUTPUT_LEVEL_STANDARD, "console", aBuf);
|
||||
}
|
||||
|
||||
void CServer::ConKick(IConsole::IResult *pResult, void *pUser)
|
||||
{
|
||||
if(pResult->NumArguments() > 1)
|
||||
|
@ -2072,7 +2079,8 @@ int main(int argc, const char **argv) // ignore_convention
|
|||
if(argc > 1) // ignore_convention
|
||||
pConsole->ParseArguments(argc-1, &argv[1]); // ignore_convention
|
||||
|
||||
pConsole->Register("sv_test_cmds", "", CFGFLAG_SERVER|CFGFLAG_CLIENT, CServer::ConTestingCommands, pConsole, "Turns testing commands aka cheats on/off");
|
||||
pConsole->Register("sv_test_cmds", "", CFGFLAG_SERVER, CServer::ConTestingCommands, pConsole, "Turns testing commands aka cheats on/off");
|
||||
pConsole->Register("sv_allow_rescue", "", CFGFLAG_SERVER, CServer::ConAllowRescue, pConsole, "Allow /rescue command so players can teleport themselves out of freeze");
|
||||
|
||||
// restore empty config strings to their defaults
|
||||
pConfig->RestoreStrings();
|
||||
|
|
|
@ -246,6 +246,7 @@ public:
|
|||
int Run();
|
||||
|
||||
static void ConTestingCommands(IConsole::IResult *pResult, void *pUser);
|
||||
static void ConAllowRescue(IConsole::IResult *pResult, void *pUser);
|
||||
static void ConKick(IConsole::IResult *pResult, void *pUser);
|
||||
static void ConStatus(IConsole::IResult *pResult, void *pUser);
|
||||
static void ConShutdown(IConsole::IResult *pResult, void *pUser);
|
||||
|
|
Loading…
Reference in a new issue