Fix regressions in b2f7d97b1ea7 and update plugins for OnClientSayCommand changes (bug 5986, r=psychonic).

This commit is contained in:
SystematicMania
2014-02-28 10:38:36 -05:00
parent 8987a34078
commit 10f878d8c7
4 changed files with 38 additions and 73 deletions
+3 -22
View File
@@ -98,22 +98,6 @@ public OnPluginStart()
{
OnAdminMenuReady(topmenu);
}
// Normally, OnClientSayCommand would be aqequate and more appropirate here, but it does
// not catch attempted chat triggers, which we also want to be blocked if a player is gagged.
AddCommandListener(Command_Say, "say");
AddCommandListener(Command_Say, "say_team");
new String:gameDir[64];
GetGameFolderName(gameDir, sizeof(gameDir));
if (StrEqual(gameDir, "insurgency", false))
{
AddCommandListener(Command_Say, "say2");
}
else if (StrEqual(gameDir, "nucleardawn", false))
{
AddCommandListener(Command_Say, "say_squad");
}
}
public OnAdminMenuReady(Handle:topmenu)
@@ -167,14 +151,11 @@ public bool:OnClientConnect(client, String:rejectmsg[], maxlen)
return true;
}
public Action:Command_Say(client, const String:command[], argc)
public Action:OnClientSayCommand(client, const String:command[], const String:sArgs[])
{
if (client)
if (client && g_Gagged[client])
{
if (g_Gagged[client])
{
return Plugin_Stop;
}
return Plugin_Stop;
}
return Plugin_Continue;