aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/utility/UAC/info.js
diff options
context:
space:
mode:
authormarzavec <admin@marzavec.com>2020-03-06 16:39:22 +0100
committerGitHub <noreply@github.com>2020-03-06 16:39:22 +0100
commit4e0e269007af349dee969724a8a0128c0ef22dae (patch)
treedaf36b87a9863a798d201242d0bbc68d39cda56d /server/src/commands/utility/UAC/info.js
parentMerge pull request #85 from MinusGix/add_channel_invite (diff)
parentMove most uses of uType filtering to use UAC levels (diff)
downloadhackchat-4e0e269007af349dee969724a8a0128c0ef22dae.tar.gz
hackchat-4e0e269007af349dee969724a8a0128c0ef22dae.zip
Merge pull request #89 from MinusGix/nul_initial2
Added UAC and numeric user levels
Diffstat (limited to 'server/src/commands/utility/UAC/info.js')
-rw-r--r--server/src/commands/utility/UAC/info.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/server/src/commands/utility/UAC/info.js b/server/src/commands/utility/UAC/info.js
new file mode 100644
index 0000000..220e14d
--- /dev/null
+++ b/server/src/commands/utility/UAC/info.js
@@ -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.',
+}; \ No newline at end of file