From 36a548df123aa85b03d48d88fd578bddd81d8eaf Mon Sep 17 00:00:00 2001 From: jenz Date: Thu, 28 Nov 2024 23:34:28 +0100 Subject: [PATCH] well fuck i forgot about those temporary changes to selfmute --- SelfMute/scripting/SelfMute.sp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/SelfMute/scripting/SelfMute.sp b/SelfMute/scripting/SelfMute.sp index 42b0120e..b441d09d 100644 --- a/SelfMute/scripting/SelfMute.sp +++ b/SelfMute/scripting/SelfMute.sp @@ -28,7 +28,6 @@ bool g_bIsProtoBuf = false; Handle g_hCookieTorchMuted = null; -bool g_bClientMuteTempOrPerm[MAXPLAYERS + 1]; Database g_hDatabase; @@ -148,7 +147,7 @@ public void SQL_GetClientsToSelfMuteForClient(Database db, DBResultSet results, if (StrEqual(cSID, sAuth)) { Ignore(client, i); - PrintToChat(client, "Player you permanent muted connected: %N", i); + //PrintToChat(client, "Player you permanent muted connected: %N", i); UpdateIgnored(); //no clue if it needs to update that often. } } @@ -159,7 +158,6 @@ public void SQL_GetClientsToSelfMuteForClient(Database db, DBResultSet results, public void OnClientPostAdminCheck(int client) { - g_bClientMuteTempOrPerm[client] = false; if(!IsValidClient(client) || IsFakeClient(client)) return; if (!g_hDatabase) @@ -228,13 +226,13 @@ public void OnPluginStart() } else { - for (int i = 1; i <= MaxClients; i++) + for (int i = 1; i <= MaxClients; i++) + { + if (IsValidClient(i) && !IsFakeClient(i)) { - if (IsValidClient(i) && !IsFakeClient(i)) - { - OnClientPostAdminCheck(i); - } + OnClientPostAdminCheck(i); } + } } LoadTranslations("common.phrases"); @@ -331,10 +329,9 @@ public void OnMapEnd() public void OnClientDisconnect(int client) { - g_bClientMuteTempOrPerm[client] = false; if (!IsFakeClient(client)) { - delete_client_from_online(client); + //delete_client_from_online(client); } g_SpecialMutes[client] = MUTE_NONE; for(int i = 1; i <= MaxClients; i++) @@ -691,7 +688,6 @@ public Action Command_SelfMutePerm(int client, int args) PrintToServer("[SM] Cannot use command from server console."); return Plugin_Handled; } - g_bClientMuteTempOrPerm[client] = true; //true for perm if(args < 1) { @@ -819,7 +815,6 @@ public Action Command_SelfMute(int client, int args) PrintToServer("[SM] Cannot use command from server console."); return Plugin_Handled; } - g_bClientMuteTempOrPerm[client] = false; //false for temp if(args < 1) {