From da9cbe3dbb799b7b668c895367c7d3778f1d0e16 Mon Sep 17 00:00:00 2001 From: marzavec Date: Fri, 6 Mar 2020 11:00:30 -0600 Subject: Minor UAC tweaks Added an underscore to the uac info lib which prevents the server from attempting to use the file as a command module, allowing removal of the 'info' property and empty 'run' command --- server/src/commands/admin/addmod.js | 2 +- server/src/commands/admin/listusers.js | 2 +- server/src/commands/admin/reload.js | 2 +- server/src/commands/admin/removemod.js | 4 ++-- server/src/commands/admin/saveconfig.js | 2 +- server/src/commands/admin/shout.js | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'server/src/commands/admin') diff --git a/server/src/commands/admin/addmod.js b/server/src/commands/admin/addmod.js index e5d8495..8f934ce 100644 --- a/server/src/commands/admin/addmod.js +++ b/server/src/commands/admin/addmod.js @@ -2,7 +2,7 @@ Description: Adds the target trip to the mod list then elevates the uType */ -import * as UAC from "../utility/UAC/info"; +import * as UAC from '../utility/UAC/_info'; // module main export async function run(core, server, socket, data) { diff --git a/server/src/commands/admin/listusers.js b/server/src/commands/admin/listusers.js index 3ab6811..54c93dc 100644 --- a/server/src/commands/admin/listusers.js +++ b/server/src/commands/admin/listusers.js @@ -2,7 +2,7 @@ Description: Outputs all current channels and their user nicks */ -import * as UAC from "../utility/UAC/info"; +import * as UAC from '../utility/UAC/_info'; // module main export async function run(core, server, socket) { diff --git a/server/src/commands/admin/reload.js b/server/src/commands/admin/reload.js index ccab805..f74624e 100644 --- a/server/src/commands/admin/reload.js +++ b/server/src/commands/admin/reload.js @@ -2,7 +2,7 @@ Description: Clears and resets the command modules, outputting any errors */ -import * as UAC from "../utility/UAC/info"; +import * as UAC from '../utility/UAC/_info'; // module main export async function run(core, server, socket, data) { diff --git a/server/src/commands/admin/removemod.js b/server/src/commands/admin/removemod.js index 48e65fb..f76ff13 100644 --- a/server/src/commands/admin/removemod.js +++ b/server/src/commands/admin/removemod.js @@ -2,7 +2,7 @@ Description: Removes target trip from the config as a mod and downgrades the socket type */ -import * as UAC from "../utility/UAC/info"; +import * as UAC from '../utility/UAC/_info'; // module main export async function run(core, server, socket, data) { @@ -20,7 +20,7 @@ export async function run(core, server, socket, data) { for (let i = 0, l = targetMod.length; i < l; i += 1) { // downgrade privilages targetMod[i].uType = 'user'; - targetMod[i].level = UAC.levels.user; + targetMod[i].level = UAC.levels.default; // inform ex-mod server.send({ diff --git a/server/src/commands/admin/saveconfig.js b/server/src/commands/admin/saveconfig.js index 708f406..b9411af 100644 --- a/server/src/commands/admin/saveconfig.js +++ b/server/src/commands/admin/saveconfig.js @@ -2,7 +2,7 @@ Description: Writes the current config to disk */ -import * as UAC from "../utility/UAC/info"; +import * as UAC from '../utility/UAC/_info'; // module main export async function run(core, server, socket) { diff --git a/server/src/commands/admin/shout.js b/server/src/commands/admin/shout.js index ee81e58..65695b3 100644 --- a/server/src/commands/admin/shout.js +++ b/server/src/commands/admin/shout.js @@ -2,7 +2,7 @@ Description: Emmits a server-wide message as `info` */ -import * as UAC from "../utility/UAC/info"; +import * as UAC from '../utility/UAC/_info'; // module main export async function run(core, server, socket, data) { -- cgit v1.2.1