Fixed crash in OnSayCommand_Post with console chat, pass console chat (bug 5864, r=voided);

--HG--
extra : rebase_source : 3090e700ea04a1b2cc6a92c727e3bb58df69500d
This commit is contained in:
Nicholas Hastings 2013-08-22 21:45:42 -04:00
parent 0dd9a5b842
commit 7dba540b97

View File

@ -331,17 +331,17 @@ void ChatTriggers::OnSayCommand_Post()
{
int client = g_ConCmds.GetCommandClient();
if (m_bWillProcessInPost)
{
/* Reset this for re-entrancy */
m_bWillProcessInPost = false;
if (m_bWillProcessInPost && client > 0)
{
/* Execute the cached command */
unsigned int old = SetReplyTo(SM_REPLY_CHAT);
serverpluginhelpers->ClientCommand(PEntityOfEntIndex(client), m_ToExecute);
SetReplyTo(old);
}
/* Reset this for re-entrancy */
m_bWillProcessInPost = false;
if (m_bPluginIgnored)
{
m_bPluginIgnored = false;