custom-chatcolors: fix !toggletag not loading when user doesn't have sm_tag permission
This commit is contained in:
parent
233fbdfa8c
commit
be756398c4
@ -2432,7 +2432,14 @@ public void OnClientPostAdminCheck(int client)
|
||||
GetClientAuthId(client, AuthId_Steam2, auth, sizeof(auth));
|
||||
KvRewind(g_hConfigFile);
|
||||
|
||||
if (!CheckCommandAccess(client, "sm_tag", ADMFLAG_CUSTOM1) || !KvJumpToKey(g_hConfigFile, auth))
|
||||
bool found = false;
|
||||
if (KvJumpToKey(g_hConfigFile, auth))
|
||||
{
|
||||
found = true;
|
||||
g_bTagToggled[client] = view_as<bool>(KvGetNum(g_hConfigFile, "toggled"));
|
||||
}
|
||||
|
||||
if (!found || !CheckCommandAccess(client, "sm_tag", ADMFLAG_CUSTOM1))
|
||||
{
|
||||
KvRewind(g_hConfigFile);
|
||||
KvGotoFirstSubKey(g_hConfigFile);
|
||||
@ -2441,7 +2448,7 @@ public void OnClientPostAdminCheck(int client)
|
||||
AdminFlag flag;
|
||||
char configFlag[2];
|
||||
char section[32];
|
||||
bool found = false;
|
||||
found = false;
|
||||
|
||||
do
|
||||
{
|
||||
@ -2491,7 +2498,7 @@ public void OnClientPostAdminCheck(int client)
|
||||
KvGetString(g_hConfigFile, "tagcolor", clientTagColor, sizeof(clientTagColor));
|
||||
KvGetString(g_hConfigFile, "namecolor", clientNameColor, sizeof(clientNameColor));
|
||||
KvGetString(g_hConfigFile, "textcolor", clientChatColor, sizeof(clientChatColor));
|
||||
g_bTagToggled[client] = view_as<bool>(KvGetNum(g_hConfigFile, "toggled"));
|
||||
|
||||
ReplaceString(clientTagColor, sizeof(clientTagColor), "#", "");
|
||||
ReplaceString(clientNameColor, sizeof(clientNameColor), "#", "");
|
||||
ReplaceString(clientChatColor, sizeof(clientChatColor), "#", "");
|
||||
|
Loading…
Reference in New Issue
Block a user