Removed admins from spectator lists.

Figured this is a good thing for public servers.

Override is "admin_speclisthide" and needed admin flag is KICK.
This commit is contained in:
shavitush 2017-07-31 14:00:43 +03:00
parent e4cf24d1c0
commit 2f609d3263

View File

@ -860,7 +860,8 @@ void UpdateSpectatorList(int client, Panel panel, bool &draw)
for(int i = 1; i <= MaxClients; i++)
{
if(i == client || !IsValidClient(i) || IsFakeClient(i) || !IsClientObserver(i) || GetEntPropEnt(i, Prop_Send, "m_hObserverTarget") != target || GetClientTeam(i) < 1)
if(i == client || !IsValidClient(i) || IsFakeClient(i) || !IsClientObserver(i) || GetEntPropEnt(i, Prop_Send, "m_hObserverTarget") != target || GetClientTeam(i) < 1
|| CheckCommandAccess(i, "admin_speclisthide", ADMFLAG_KICK))
{
continue;
}
@ -973,7 +974,8 @@ void UpdateKeyHint(int client)
for(int i = 1; i <= MaxClients; i++)
{
if(i == client || !IsValidClient(i) || IsFakeClient(i) || !IsClientObserver(i) || GetEntPropEnt(i, Prop_Send, "m_hObserverTarget") != target || GetClientTeam(i) < 1)
if(i == client || !IsValidClient(i) || IsFakeClient(i) || !IsClientObserver(i) || GetEntPropEnt(i, Prop_Send, "m_hObserverTarget") != target
|| GetClientTeam(i) < 1 || CheckCommandAccess(i, "admin_speclisthide", ADMFLAG_KICK))
{
continue;
}