aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/core/help.js
diff options
context:
space:
mode:
authormarzavec <admin@marzavec.com>2019-04-08 02:04:10 +0200
committermarzavec <admin@marzavec.com>2019-04-08 02:04:10 +0200
commitf353ecbd9e9e8e409303bb4f5c5590e95f579869 (patch)
tree3345967ae59a46f59fe86c0d6fda432115594927 /server/src/commands/core/help.js
parentrefactoring 1 of 2 (diff)
downloadhackchat-f353ecbd9e9e8e409303bb4f5c5590e95f579869.tar.gz
hackchat-f353ecbd9e9e8e409303bb4f5c5590e95f579869.zip
refactoring 2 of 2
Diffstat (limited to 'server/src/commands/core/help.js')
-rw-r--r--server/src/commands/core/help.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/commands/core/help.js b/server/src/commands/core/help.js
index 51f6d87..8eccdb6 100644
--- a/server/src/commands/core/help.js
+++ b/server/src/commands/core/help.js
@@ -8,7 +8,7 @@ const stripIndents = require('common-tags').stripIndents;
// module main
exports.run = async (core, server, socket, payload) => {
// check for spam
- if (server._police.frisk(socket.remoteAddress, 2)) {
+ if (server.police.frisk(socket.remoteAddress, 2)) {
return server.reply({
cmd: 'warn',
text: 'You are sending too much text. Wait a moment and try again.\nPress the up arrow key to restore your last message.'
@@ -27,7 +27,7 @@ exports.run = async (core, server, socket, payload) => {
API: {cmd: 'help', command: '<command name>'}`;
reply += '\n\n-------------------------------------\n\n';
- let categories = core.commands.categories().sort();
+ let categories = core.commands.categoriesList.sort();
for (let i = 0, j = categories.length; i < j; i++) {
reply += `${categories[i].replace('../src/commands/', '').replace(/^\w/, c => c.toUpperCase())} Commands:\n`;
let catCommands = core.commands.all(categories[i]).sort((a, b) => a.info.name.localeCompare(b.info.name));