Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new AdminId:admin = GetUserAdmin(client);
- new AdminFlag:flag;
- decl String:configFlag[2];
- decl String:section[32];
- new bool:found = false;
- do {
- KvGetSectionName(configFile, section, sizeof(section));
- KvGetString(configFile, "flag", configFlag, sizeof(configFlag));
- if(strlen(configFlag) > 1) {
- LogError("Multiple flags given in section \"%s\", which is not allowed. Using first character.", section);
- }
- if(strlen(configFlag) == 0 && StrContains(section, "STEAM_", false) == -1 && StrContains(section, "[U:1:", false) == -1) {
- found = true;
- break;
- }
- if(!FindFlagByChar(configFlag[0], flag)) {
- if(strlen(configFlag) > 0) {
- LogError("Invalid flag given for section \"%s\", skipping", section);
- }
- continue;
- }
- if(GetAdminFlag(admin, flag)) { // The part where McKay checks if client has the flag access thingy.
- found = true;
- break;
- }
- } while(KvGotoNextKey(configFile));
- if(!found) {
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement