Revert "ReservedSlots: give non-donators a chance to join a team before getting kicked"

This reverts commit db4c6b58b8.

Got an even better idea to handle this in AFKManager.
This commit is contained in:
hubdom 2020-12-27 22:05:28 +01:00
parent cf1299454a
commit 6f13eb0383

View File

@ -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 */