core/ChatTriggers.cpp
changeset 4044 a44d2b556b96
parent 4042 8bc2d9569803
child 4050 f04f6114dc9e
     1.1 --- a/core/ChatTriggers.cpp	Fri Aug 23 15:45:07 2013 -0700
     1.2 +++ b/core/ChatTriggers.cpp	Fri Aug 23 18:48:06 2013 -0400
     1.3 @@ -304,15 +304,12 @@
     1.4  		m_bTriggerWasSilent = is_silent;
     1.5  	}
     1.6  
     1.7 -	if (m_pOnClientSayCmd->GetFunctionCount() != 0)
     1.8 -	{
     1.9 -		cell_t res = CallOnClientSayCommand(client);
    1.10 +	cell_t res = CallOnClientSayCommand(client);
    1.11  
    1.12 -		if (res >= Pl_Handled)
    1.13 -		{
    1.14 -			m_bPluginIgnored = (res >= Pl_Stop);
    1.15 -			RETURN_META(MRES_SUPERCEDE);
    1.16 -		}
    1.17 +	if (res >= Pl_Handled)
    1.18 +	{
    1.19 +		m_bPluginIgnored = (res >= Pl_Stop);
    1.20 +		RETURN_META(MRES_SUPERCEDE);
    1.21  	}
    1.22  
    1.23  	if (m_bWillProcessInPost || \
    1.24 @@ -443,10 +440,13 @@
    1.25  cell_t ChatTriggers::CallOnClientSayCommand(int client)
    1.26  {
    1.27  	cell_t res = Pl_Continue;
    1.28 -	m_pOnClientSayCmd->PushCell(client);
    1.29 -	m_pOnClientSayCmd->PushString(m_Arg0Backup);
    1.30 -	m_pOnClientSayCmd->PushString(m_ArgSBackup);
    1.31 -	m_pOnClientSayCmd->Execute(&res);
    1.32 +	if (m_pOnClientSayCmd->GetFunctionCount() != 0)
    1.33 +	{
    1.34 +		m_pOnClientSayCmd->PushCell(client);
    1.35 +		m_pOnClientSayCmd->PushString(m_Arg0Backup);
    1.36 +		m_pOnClientSayCmd->PushString(m_ArgSBackup);
    1.37 +		m_pOnClientSayCmd->Execute(&res);
    1.38 +	}
    1.39  	return res;
    1.40  }
    1.41