aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/mod/unbanall.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/mod/unbanall.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 '')
-rw-r--r--server/src/commands/mod/unbanall.js6
1 files changed, 4 insertions, 2 deletions
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;
}