added chat trigger detection

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401475
This commit is contained in:
David Anderson
2007-09-24 15:06:10 +00:00
parent e4728b0413
commit a8aa9d2d7f
5 changed files with 28 additions and 1 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ public OnPluginStart()
public Action:Command_SayChat(client, args)
{
decl String:text[192];
if (GetCmdArgString(text, sizeof(text)) < 1)
if (IsChatTrigger() || GetCmdArgString(text, sizeof(text)) < 1)
{
return Plugin_Continue;
}
+9
View File
@@ -230,6 +230,15 @@ native ReplySource:GetCmdReplySource();
*/
native ReplySource:SetCmdReplySource(ReplySource:source);
/**
* Returns whether the current say hook is a chat trigger.
*
* This function is only meaningful inside say or say_team hooks.
*
* @return True if a chat trigger, false otherwise.
*/
native bool:IsChatTrigger();
/**
* Displays usage of an admin command to users depending on the
* setting of the sm_show_activity cvar. Additionally, the client