diff --git a/server-api/src/perms.rs b/server-api/src/perms.rs index dc0a8b7..da29ec6 100644 --- a/server-api/src/perms.rs +++ b/server-api/src/perms.rs @@ -1,4 +1,21 @@ + +// GENERAL PERMISSIONS pub const JOIN_VOICE:u64 = 1; pub const SEND_MESSAGES:u64 = 2; +pub const CHANGE_NICK:u64 = 16; +pub const ALLOW_PFP:u64 = 32; +pub const CREATE_TMP_INVITES:u64 = 4; +pub const CREATE_PERM_INVITES:u64 = 8; // to make perma invites you need both flags -pub const GENERAL_NEW: u64 = JOIN_VOICE | SEND_MESSAGES; + +pub const OWNER: u64 = 1 << 63; +pub const ADMIN: u64 = 1 << 62; // can make other admins but can't really touch the owner + +// ADMIN PERMS +pub const CREATE_CHANNEL:u64 = 64; +pub const DELETE_CHANNEL:u64 = 128; + +// BELOW ARE COLLECTIVE PERMISSION SETS +pub const OWNER_PERMS: u64 = std::u64::MAX; +pub const GENERAL_NEW: u64 = JOIN_VOICE | SEND_MESSAGES | ALLOW_PFP | CHANGE_NICK; +pub const ADMIN_PERMS: u64 = !(std::u64::MAX & OWNER); // filter the only perm admins don't get