mirror of
https://github.com/hack-chat/main.git
synced 2024-03-22 13:20:33 +08:00
Add UAC info file with levels and minor utility functions
This commit is contained in:
parent
133740a250
commit
3569d42f2d
32
server/src/commands/utility/UAC/info.js
Normal file
32
server/src/commands/utility/UAC/info.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
export const levels = {
|
||||
admin : 9999999,
|
||||
moderator : 999999,
|
||||
|
||||
channelOwner : 99999,
|
||||
channelModerator : 9999,
|
||||
|
||||
user : 100,
|
||||
};
|
||||
|
||||
export function isAdmin (level) {
|
||||
return level >= levels.admin;
|
||||
}
|
||||
|
||||
export function isModerator (level) {
|
||||
return level >= levels.moderator;
|
||||
}
|
||||
|
||||
export function isChannelOwner (level) {
|
||||
return level >= levels.channelOwner;
|
||||
}
|
||||
|
||||
export function isChannelModerator (level) {
|
||||
return level >= levels.channelModerator;
|
||||
}
|
||||
|
||||
export async function run (core, server, socket, data) {}
|
||||
|
||||
export const info = {
|
||||
name: 'uac_info',
|
||||
description: 'This module contains information about UAC levels, and minor utility functions.',
|
||||
};
|
Loading…
Reference in New Issue
Block a user