No message. 83 files changed.

This commit is contained in:
Vortrex
2021-01-11 10:31:49 -06:00
parent ce8579364c
commit 7f2ee0c8d5
83 changed files with 1544 additions and 746 deletions

View File

@@ -1,7 +1,7 @@
// ===========================================================================
// Asshat-Gaming Roleplay
// https://github.com/VortrexFTW/gtac_asshat_rp
// Copyright (c) 2020 Asshat-Gaming (https://asshatgaming.com)
// Copyright (c) 2021 Asshat-Gaming (https://asshatgaming.com)
// ---------------------------------------------------------------------------
// FILE: bitflags.js
// DESC: Provides bitwise operations, functions and usage
@@ -138,6 +138,14 @@ function createBitFlagTable(keyNames) {
// ---------------------------------------------------------------------------
function hasBitFlag(allFlags, checkForFlag) {
if(allFlags == 0) {
return false;
}
if(allFlags == -1) {
return true;
}
return (allFlags & checkForFlag);
}
@@ -153,10 +161,8 @@ function doesPlayerHaveStaffPermission(client, requiredFlags) {
}
let staffFlags = 0;
if(!isClientFromDiscord(client)) {
if(getPlayerData(client)) {
staffFlags = getPlayerData(client).accountData.flags.admin;
} else {
staffFlags = getDiscordUserData(client).accountData.flags.admin;
}
// -1 is automatic override (having -1 for staff flags is basically god mode admin level)
@@ -319,4 +325,6 @@ function getServerBitFlags() {
function getServerBitFlagKeys() {
return serverBitFlagKeys;
}
}
// ---------------------------------------------------------------------------