From 50737bc0d9c1ae806610e76be013eeddca1bf102 Mon Sep 17 00:00:00 2001 From: MinusGix Date: Thu, 5 Mar 2020 10:49:25 -0600 Subject: Move most uses of uType filtering to use UAC levels --- server/src/commands/mod/unbanall.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/src/commands/mod/unbanall.js') diff --git a/server/src/commands/mod/unbanall.js b/server/src/commands/mod/unbanall.js index 49eeee5..e6affc4 100644 --- a/server/src/commands/mod/unbanall.js +++ b/server/src/commands/mod/unbanall.js @@ -2,10 +2,12 @@ Description: Clears all bans and ratelimits */ +import * as UAC from "../utility/UAC/info"; + // module main export async function run(core, server, socket) { // increase rate limit chance and ignore if not admin or mod - if (socket.uType === 'user') { + if (!UAC.isModerator(socket.level)) { return server.police.frisk(socket.address, 10); } @@ -24,7 +26,7 @@ export async function run(core, server, socket) { server.broadcast({ cmd: 'info', text: `${socket.nick} unbanned all ip addresses`, - }, { uType: 'mod' }); + }, { level: UAC.isModerator }); return true; } -- cgit v1.2.1