Don't call SayCommand forwards for chat triggers (bug 5863, r=asherkin).

This commit is contained in:
Nicholas Hastings 2013-08-24 21:59:52 -04:00
parent d77ff38428
commit 676ea8b29c

View File

@ -343,7 +343,7 @@ void ChatTriggers::OnSayCommand_Post()
{
m_bPluginIgnored = false;
}
else if (!m_bWasFloodedMessage && m_pOnClientSayCmd_Post->GetFunctionCount() != 0)
else if (!m_bWasFloodedMessage && !m_bIsChatTrigger && m_pOnClientSayCmd_Post->GetFunctionCount() != 0)
{
m_pOnClientSayCmd_Post->PushCell(client);
m_pOnClientSayCmd_Post->PushString(m_Arg0Backup);
@ -432,7 +432,7 @@ bool ChatTriggers::PreProcessTrigger(edict_t *pEdict, const char *args, bool is_
cell_t ChatTriggers::CallOnClientSayCommand(int client)
{
cell_t res = Pl_Continue;
if (m_pOnClientSayCmd->GetFunctionCount() != 0)
if (!m_bIsChatTrigger && m_pOnClientSayCmd->GetFunctionCount() != 0)
{
m_pOnClientSayCmd->PushCell(client);
m_pOnClientSayCmd->PushString(m_Arg0Backup);