From f28e65ab8035682372edbe1c11d9ca2581e0a2e6 Mon Sep 17 00:00:00 2001 From: marzavec Date: Wed, 6 Nov 2019 23:35:23 -0800 Subject: Syntax update and formatting tweaks --- server/src/commands/mod/unbanall.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 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 c285b80..49eeee5 100644 --- a/server/src/commands/mod/unbanall.js +++ b/server/src/commands/mod/unbanall.js @@ -3,34 +3,35 @@ */ // module main -exports.run = async (core, server, socket, data) => { +export async function run(core, server, socket) { // increase rate limit chance and ignore if not admin or mod if (socket.uType === 'user') { - return server.police.frisk(socket.remoteAddress, 10); + return server.police.frisk(socket.address, 10); } // remove arrest records - server.police.records = {}; + server.police.clear(); console.log(`${socket.nick} [${socket.trip}] unbanned all`); // reply with success server.reply({ cmd: 'info', - text: `Unbanned all ip addresses` + text: 'Unbanned all ip addresses', }, socket); // notify mods server.broadcast({ cmd: 'info', - text: `${socket.nick} unbanned all ip addresses` + text: `${socket.nick} unbanned all ip addresses`, }, { uType: 'mod' }); -}; -// module meta -exports.info = { + return true; +} + +export const info = { name: 'unbanall', description: 'Clears all banned ip addresses', usage: ` - API: { cmd: 'unbanall' }` + API: { cmd: 'unbanall' }`, }; -- cgit v1.2.1