Fix chat commands being too verbose if console_output_level is set on config file. Close #116

This commit is contained in:
Ravomavain 2011-10-31 19:08:21 +01:00
parent fcf6a1dad5
commit 24fc16543c
2 changed files with 3 additions and 1 deletions

View file

@ -756,6 +756,7 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
Console()->SetAccessLevel(pPlayer->m_Authed == CServer::AUTHED_ADMIN ? IConsole::ACCESS_LEVEL_ADMIN : IConsole::ACCESS_LEVEL_MOD);
else
Console()->SetAccessLevel(IConsole::ACCESS_LEVEL_USER);
Console()->SetPrintOutputLevel(m_ChatPrintCBIndex, 0);
Console()->ExecuteLine(pMsg->m_pMessage + 1, ClientID);
Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "chat-command", pMsg->m_pMessage);
@ -1638,7 +1639,7 @@ void CGameContext::OnConsoleInit()
m_pServer = Kernel()->RequestInterface<IServer>();
m_pConsole = Kernel()->RequestInterface<IConsole>();
Console()->RegisterPrintCallback(0, SendChatResponse, this);
m_ChatPrintCBIndex = Console()->RegisterPrintCallback(0, SendChatResponse, this);
Console()->Register("tune", "si", CFGFLAG_SERVER, ConTuneParam, this, "Tune variable to value");
Console()->Register("tune_reset", "", CFGFLAG_SERVER, ConTuneReset, this, "Reset tuning");

View file

@ -270,6 +270,7 @@ public:
void ResetTuning();
int m_ChatResponseTargetID;
int m_ChatPrintCBIndex;
};
inline int CmaskAll() { return -1; }