From 19796cdce4c6c5e669b4e50ff02dfb5f093fb44e Mon Sep 17 00:00:00 2001 From: furo Date: Sun, 18 Feb 2024 18:42:22 +0100 Subject: [PATCH] Don't tell user about `/cmdlist` in rcon when using an unknown command. --- src/engine/shared/console.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/shared/console.cpp b/src/engine/shared/console.cpp index ebace1d1f..1f1df48ab 100644 --- a/src/engine/shared/console.cpp +++ b/src/engine/shared/console.cpp @@ -547,7 +547,10 @@ void CConsole::ExecuteLineStroked(int Stroke, const char *pStr, int ClientID, bo if(!m_pfnUnknownCommandCallback(pStr, m_pUnknownCommandUserdata)) { char aBuf[CMDLINE_LENGTH + 32]; - str_format(aBuf, sizeof(aBuf), "No such command: %s. Use /cmdlist for a list of all commands.", Result.m_pCommand); + if(m_FlagMask & CFGFLAG_CHAT) + str_format(aBuf, sizeof(aBuf), "No such command: %s. Use /cmdlist for a list of all commands.", Result.m_pCommand); + else + str_format(aBuf, sizeof(aBuf), "No such command: %s.", Result.m_pCommand); Print(OUTPUT_LEVEL_STANDARD, "chatresp", aBuf); } }