fixed race condition that would overwrite admin access when using the unloze clan tag
This commit is contained in:
parent
f8a4043e5d
commit
d2bb72bb88
@ -13,6 +13,8 @@ public Plugin myinfo =
|
||||
url = ""
|
||||
};
|
||||
|
||||
bool post_filter_admin[MAXPLAYERS + 1];
|
||||
|
||||
public void OnPluginStart()
|
||||
{
|
||||
/* Handle late load */
|
||||
@ -25,8 +27,14 @@ public void OnPluginStart()
|
||||
}
|
||||
}
|
||||
|
||||
public void OnClientDisconnect(int client)
|
||||
{
|
||||
post_filter_admin[client] = false;
|
||||
}
|
||||
|
||||
public void OnClientPostAdminFilter(int client)
|
||||
{
|
||||
post_filter_admin[client] = true;
|
||||
CheckClantag(client);
|
||||
}
|
||||
|
||||
@ -39,6 +47,10 @@ void CheckClantag(int client)
|
||||
{
|
||||
if(!IsClientAuthorized(client))
|
||||
return;
|
||||
if (!post_filter_admin[client])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
char sClanID[32];
|
||||
GetClientInfo(client, "cl_clanid", sClanID, sizeof(sClanID));
|
||||
|
Loading…
Reference in New Issue
Block a user