diff -r 32e36d3570f0 -r c2836eb6c34a plugins/basecomm.sp --- a/plugins/basecomm.sp Thu Feb 27 23:46:51 2014 -0500 +++ b/plugins/basecomm.sp Fri Feb 28 10:38:36 2014 -0500 @@ -98,22 +98,6 @@ { 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 @@ 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;