Merge pull request #7869 from furo321/testcmds-error

Add a error message for when testing commands aren't allowed
This commit is contained in:
heinrich5991 2024-01-27 17:59:51 +00:00 committed by GitHub
commit dcdc66d1df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -502,7 +502,10 @@ void CConsole::ExecuteLineStroked(int Stroke, const char *pStr, int ClientID, bo
else else
{ {
if(pCommand->m_Flags & CMDFLAG_TEST && !g_Config.m_SvTestingCommands) if(pCommand->m_Flags & CMDFLAG_TEST && !g_Config.m_SvTestingCommands)
{
Print(OUTPUT_LEVEL_STANDARD, "console", "Test commands aren't allowed, enable them with 'sv_test_cmds 1' in your initial config.");
return; return;
}
if(m_pfnTeeHistorianCommandCallback && !(pCommand->m_Flags & CFGFLAG_NONTEEHISTORIC)) if(m_pfnTeeHistorianCommandCallback && !(pCommand->m_Flags & CFGFLAG_NONTEEHISTORIC))
{ {