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/core/move.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 'server/src/commands/core/move.js')
-rw-r--r-- | server/src/commands/core/move.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/src/commands/core/move.js b/server/src/commands/core/move.js index 284a38d..e85f481 100644 --- a/server/src/commands/core/move.js +++ b/server/src/commands/core/move.js @@ -2,15 +2,14 @@ Description: Changes the current channel of the calling socket */ +// module main exports.run = async (core, server, socket, data) => { // check for spam if (server._police.frisk(socket.remoteAddress, 6)) { - server.reply({ + return server.reply({ cmd: 'warn', text: 'You are changing channels too fast. Wait a moment before trying again.' }, socket); - - return; } // check user input @@ -81,10 +80,11 @@ exports.run = async (core, server, socket, data) => { socket.channel = data.channel; }; +// module meta exports.requiredData = ['channel']; - exports.info = { name: 'move', - usage: 'move {channel}', - description: 'This will change the current channel to the new one provided' + description: 'This will change your current channel to the new one provided', + usage: ` + API: { cmd: 'move', channel: '<target channel>' }` }; |