diff options
author | marzavec <admin@marzavec.com> | 2018-09-30 08:44:36 +0200 |
---|---|---|
committer | marzavec <admin@marzavec.com> | 2018-09-30 08:44:36 +0200 |
commit | c719020e17cb1c98da55be6cc7efe0e50ab51ffa (patch) | |
tree | 4c1e7f05aec2b6a995e21d2bbecbb45c2ae14bd6 /server/src/commands/admin/listusers.js | |
parent | Merge pull request #28 from henrywright/27 (diff) | |
download | hackchat-c719020e17cb1c98da55be6cc7efe0e50ab51ffa.tar.gz hackchat-c719020e17cb1c98da55be6cc7efe0e50ab51ffa.zip |
Added hooks, modules and cleaned up code
Diffstat (limited to '')
-rw-r--r-- | server/src/commands/admin/listusers.js | 10 |
1 files changed, 6 insertions, 4 deletions
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' }` }; |