Skip to content

Commit

Permalink
Merge pull request ddnet#9115 from Pioooooo/fix-help-command
Browse files Browse the repository at this point in the history
Fix /help not printing help for several chat commands
  • Loading branch information
def- authored Oct 5, 2024
2 parents c6f2c84 + 4f7aa0e commit a1d7f0f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/game/server/ddracechat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void CGameContext::ConHelp(IConsole::IResult *pResult, void *pUserData)
{
const char *pArg = pResult->GetString(0);
const IConsole::CCommandInfo *pCmdInfo =
pSelf->Console()->GetCommandInfo(pArg, CFGFLAG_SERVER, false);
pSelf->Console()->GetCommandInfo(pArg, CFGFLAG_SERVER | CFGFLAG_CHAT, false);
if(pCmdInfo)
{
if(pCmdInfo->m_pParams)
Expand All @@ -127,10 +127,11 @@ void CGameContext::ConHelp(IConsole::IResult *pResult, void *pUserData)
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "chatresp", pCmdInfo->m_pHelp);
}
else
pSelf->Console()->Print(
IConsole::OUTPUT_LEVEL_STANDARD,
"chatresp",
"Command is either unknown or you have given a blank command without any parameters.");
{
char aBuf[256];
str_format(aBuf, sizeof(aBuf), "Unknown command %s", pArg);
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "chatresp", aBuf);
}
}
}

Expand Down

0 comments on commit a1d7f0f

Please sign in to comment.