Skip to content

Commit

Permalink
Fix /help not printing help for several chat commands and improve hel…
Browse files Browse the repository at this point in the history
…p message
  • Loading branch information
Pioooooo committed Oct 5, 2024
1 parent 7a74c05 commit 4f7aa0e
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 4f7aa0e

Please sign in to comment.