From c719020e17cb1c98da55be6cc7efe0e50ab51ffa Mon Sep 17 00:00:00 2001 From: marzavec Date: Sat, 29 Sep 2018 23:44:36 -0700 Subject: Added hooks, modules and cleaned up code --- server/src/commands/admin/listusers.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'server/src/commands/admin/listusers.js') diff --git a/server/src/commands/admin/listusers.js b/server/src/commands/admin/listusers.js index d3dddc2..85fc078 100644 --- a/server/src/commands/admin/listusers.js +++ b/server/src/commands/admin/listusers.js @@ -2,12 +2,11 @@ Description: Outputs all current channels and their user nicks */ +// module main exports.run = async (core, server, socket, data) => { // increase rate limit chance and ignore if not admin if (socket.uType != 'admin') { - server._police.frisk(socket.remoteAddress, 20); - - return; + return server._police.frisk(socket.remoteAddress, 20); } // find all users currently in a channel @@ -37,7 +36,10 @@ exports.run = async (core, server, socket, data) => { }, socket); }; +// module meta exports.info = { name: 'listusers', - description: 'Outputs all current channels and sockets in those channels' + description: 'Outputs all current channels and sockets in those channels', + usage: ` + API: { cmd: 'listusers' }` }; -- cgit v1.2.1