Fix regressions in b2f7d97b1ea7 and update plugins for OnClientSayCommand changes (bug 5986, r=psychonic).
This commit is contained in:
+3
-22
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user