Advertisement
Guest User

Untitled

a guest
Jun 13th, 2016
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.25 KB | None | 0 0
  1.         new AdminId:admin = GetUserAdmin(client);
  2.         new AdminFlag:flag;
  3.         decl String:configFlag[2];
  4.         decl String:section[32];
  5.         new bool:found = false;
  6.         do {
  7.             KvGetSectionName(configFile, section, sizeof(section));
  8.             KvGetString(configFile, "flag", configFlag, sizeof(configFlag));
  9.             if(strlen(configFlag) > 1) {
  10.                 LogError("Multiple flags given in section \"%s\", which is not allowed. Using first character.", section);
  11.             }
  12.             if(strlen(configFlag) == 0 && StrContains(section, "STEAM_", false) == -1 && StrContains(section, "[U:1:", false) == -1) {
  13.                 found = true;
  14.                 break;
  15.             }
  16.             if(!FindFlagByChar(configFlag[0], flag)) {
  17.                 if(strlen(configFlag) > 0) {
  18.                     LogError("Invalid flag given for section \"%s\", skipping", section);
  19.                 }
  20.                 continue;
  21.             }
  22.             if(GetAdminFlag(admin, flag)) { // The part where McKay checks if client has the flag access thingy.
  23.                 found = true;
  24.                 break;
  25.             }
  26.         } while(KvGotoNextKey(configFile));
  27.         if(!found) {
  28.             return;
  29.         }
  30.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement