added chat trigger detection
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401475
This commit is contained in:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user