diff options
author | marzavec <admin@marzavec.com> | 2018-03-11 07:41:17 +0100 |
---|---|---|
committer | marzavec <admin@marzavec.com> | 2018-03-11 07:41:26 +0100 |
commit | 7d8220d838f82f7ad1ffedbcbd3b955aef6d71a2 (patch) | |
tree | c73d26f8d6e3b2c7af23e4afcd55ea7ceccf3596 /server/src/commands/admin | |
parent | Merge pull request #1 from MinusGix/master (diff) | |
download | hackchat-7d8220d838f82f7ad1ffedbcbd3b955aef6d71a2.tar.gz hackchat-7d8220d838f82f7ad1ffedbcbd3b955aef6d71a2.zip |
stabilized modules and server cmd field
Diffstat (limited to 'server/src/commands/admin')
-rw-r--r-- | server/src/commands/admin/listusers.js | 1 | ||||
-rw-r--r-- | server/src/commands/admin/reload.js | 4 | ||||
-rw-r--r-- | server/src/commands/admin/saveconfig.js | 6 |
3 files changed, 7 insertions, 4 deletions
diff --git a/server/src/commands/admin/listusers.js b/server/src/commands/admin/listusers.js index a853518..1ddb16b 100644 --- a/server/src/commands/admin/listusers.js +++ b/server/src/commands/admin/listusers.js @@ -36,6 +36,5 @@ exports.run = async (core, server, socket, data) => { exports.info = { name: 'listusers', - usage: 'listusers', description: 'Outputs all current channels and sockets in those channels' }; diff --git a/server/src/commands/admin/reload.js b/server/src/commands/admin/reload.js index 7aefbcf..88e40c7 100644 --- a/server/src/commands/admin/reload.js +++ b/server/src/commands/admin/reload.js @@ -13,8 +13,9 @@ exports.run = async (core, server, socket, data) => { let loadResult = core.managers.dynamicImports.reloadDirCache('src/commands'); loadResult += core.commands.loadCommands(); - if (loadResult == '') + if (loadResult == '') { loadResult = 'Commands reloaded without errors!'; + } server.reply({ cmd: 'info', @@ -29,6 +30,5 @@ exports.run = async (core, server, socket, data) => { exports.info = { name: 'reload', - usage: 'reload', description: '(Re)loads any new commands into memory, outputs errors if any' }; diff --git a/server/src/commands/admin/saveconfig.js b/server/src/commands/admin/saveconfig.js index e1a3ebe..4c6dff8 100644 --- a/server/src/commands/admin/saveconfig.js +++ b/server/src/commands/admin/saveconfig.js @@ -21,6 +21,11 @@ exports.run = async (core, server, socket, data) => { return; } + server.reply({ + cmd: 'info', + text: 'Config saved!' + }, socket); + server.broadcast({ cmd: 'info', text: 'Config saved!' @@ -29,6 +34,5 @@ exports.run = async (core, server, socket, data) => { exports.info = { name: 'saveconfig', - usage: 'saveconfig', description: 'Saves current config' }; |