From bf996e868e03b47e0db47c7f4b07a57c973fe5f5 Mon Sep 17 00:00:00 2001 From: Sachin <31343375+Cruze03@users.noreply.github.com> Date: Sun, 25 Apr 2021 11:27:37 +0530 Subject: [PATCH] 2.7-BETA --- scripting/discord_utilities/forwards.sp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripting/discord_utilities/forwards.sp b/scripting/discord_utilities/forwards.sp index 8975a6b..c5b51ac 100644 --- a/scripting/discord_utilities/forwards.sp +++ b/scripting/discord_utilities/forwards.sp @@ -10,6 +10,7 @@ public void OnLibraryAdded(const char[] szLibrary) else if(StrEqual(szLibrary, "calladmin")) g_bCallAdmin = true; else if(StrEqual(szLibrary, "shavit")) g_bShavit = true; else if(StrEqual(szLibrary, "bugreport")) g_bBugReport = true; + else if(StrEqual(szLibrary, "basecomm")) g_bBaseComm = true; } public void OnLibraryRemoved(const char[] szLibrary) @@ -19,6 +20,7 @@ public void OnLibraryRemoved(const char[] szLibrary) else if(StrEqual(szLibrary, "calladmin")) g_bCallAdmin = false; else if(StrEqual(szLibrary, "shavit")) g_bShavit = false; else if(StrEqual(szLibrary, "bugreport")) g_bBugReport = false; + else if(StrEqual(szLibrary, "basecomm")) g_bBaseComm = false; } public void OnAllPluginsLoaded() @@ -33,6 +35,7 @@ public void OnAllPluginsLoaded() g_bCallAdmin = LibraryExists("calladmin"); g_bShavit = LibraryExists("shavit"); g_bBugReport = LibraryExists("bugreport"); + g_bBaseComm = LibraryExists("basecomm"); } public void OnConfigsExecuted() @@ -112,6 +115,10 @@ public Action Command_AdminChat(int client, const char[] command, int argc) { return Plugin_Continue; } + if(g_bBaseComm && BaseComm_IsClientGagged(client)) + { + return Plugin_Continue; + } if(1 <= client <= MaxClients) { char sMessage[256]; @@ -127,6 +134,10 @@ public Action OnClientSayCommand(int client, const char[] command, const char[] { return Plugin_Continue; } + if(g_bBaseComm && BaseComm_IsClientGagged(client)) + { + return Plugin_Continue; + } if(1 <= client <= MaxClients) { if(strcmp(command, "say") != 0 && strcmp(command, "say_team") != 0)