aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/admin/reload.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/commands/admin/reload.js')
-rw-r--r--server/src/commands/admin/reload.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/server/src/commands/admin/reload.js b/server/src/commands/admin/reload.js
index 206e2ca..ccab805 100644
--- a/server/src/commands/admin/reload.js
+++ b/server/src/commands/admin/reload.js
@@ -2,10 +2,12 @@
Description: Clears and resets the command modules, outputting any errors
*/
+import * as UAC from "../utility/UAC/info";
+
// module main
export async function run(core, server, socket, data) {
// increase rate limit chance and ignore if not admin
- if (socket.uType !== 'admin') {
+ if (!UAC.isAdmin(socket.level)) {
return server.police.frisk(socket.address, 20);
}
@@ -28,17 +30,11 @@ export async function run(core, server, socket, data) {
loadResult += `\nReason: ${data.reason}`;
}
- // reply with results
+ // send results to moderators (which the user using this command is higher than)
server.reply({
cmd: 'info',
text: loadResult,
- }, socket);
-
- // notify mods of reload #transparency
- server.broadcast({
- cmd: 'info',
- text: loadResult,
- }, { uType: 'mod' });
+ }, { level: UAC.isModerator });
return true;
}