Skip to content

Commit

Permalink
2.7-BETA
Browse files Browse the repository at this point in the history
  • Loading branch information
Cruze03 authored Apr 25, 2021
1 parent 9d55b2a commit bf996e8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripting/discord_utilities/forwards.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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];
Expand All @@ -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)
Expand Down

0 comments on commit bf996e8

Please sign in to comment.