From 6f13eb0383ea93b23f592d64d131bf592dfd7457 Mon Sep 17 00:00:00 2001 From: hubdom <26039831+hubdom@users.noreply.github.com> Date: Sun, 27 Dec 2020 22:05:28 +0100 Subject: [PATCH] Revert "ReservedSlots: give non-donators a chance to join a team before getting kicked" This reverts commit db4c6b58b850ec58b1d8acc973f2d6f1578b67b3. Got an even better idea to handle this in AFKManager. --- ReservedSlot/scripting/ReservedSlot.sp | 30 +++++++------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/ReservedSlot/scripting/ReservedSlot.sp b/ReservedSlot/scripting/ReservedSlot.sp index 32fc6036..7370b716 100644 --- a/ReservedSlot/scripting/ReservedSlot.sp +++ b/ReservedSlot/scripting/ReservedSlot.sp @@ -156,8 +156,8 @@ public void AsyncHasSteamIDReservedSlotCallback(const char[] sSteam32ID, int Res stock bool KickValidClient(const char[] sName, const char[] sSteam32ID, AdminId admin, int Immunity) { - int HighestValue[4] = {-1, ...}; - int HighestValueClient[4] = {0, ...}; + int HighestValue[3] = {-1, ...}; + int HighestValueClient[3] = {0, ...}; for(int client = 1; client <= MaxClients; client++) { @@ -180,11 +180,11 @@ stock bool KickValidClient(const char[] sName, const char[] sSteam32ID, AdminId #endif /* Spectators - * Sort by idle time and kick non-donators if IdleTime > 10 + * Sort by idle time and also kick donators if IdleTime > 30 */ if(GetClientTeam(client) <= CS_TEAM_SPECTATOR) { - if(!Donator && IdleTime > 10) + if(!Donator || IdleTime > 30) { if(IdleTime > HighestValue[0]) { @@ -193,20 +193,6 @@ stock bool KickValidClient(const char[] sName, const char[] sSteam32ID, AdminId } } } - /* Spectators - * Sort by idle time and also kick donators if IdleTime > 30 - */ - if(GetClientTeam(client) <= CS_TEAM_SPECTATOR) - { - if(Donator && IdleTime > 30) - { - if(IdleTime > HighestValue[0]) - { - HighestValue[1] = IdleTime; - HighestValueClient[1] = client; - } - } - } /* Spectators */ /* Dead non-donator with IdleTime > 30 @@ -216,8 +202,8 @@ stock bool KickValidClient(const char[] sName, const char[] sSteam32ID, AdminId { if(IdleTime > 30 && IdleTime > HighestValue[1]) { - HighestValue[2] = IdleTime; - HighestValueClient[2] = client; + HighestValue[1] = IdleTime; + HighestValueClient[1] = client; } } /* Dead non-donator with IdleTime > 30 */ @@ -229,8 +215,8 @@ stock bool KickValidClient(const char[] sName, const char[] sSteam32ID, AdminId { if(IdleTime > 30 && IdleTime > HighestValue[2]) { - HighestValue[3] = IdleTime; - HighestValueClient[3] = client; + HighestValue[2] = IdleTime; + HighestValueClient[2] = client; } } /* Alive non-donator with IdleTime > 30 */