From 7d8220d838f82f7ad1ffedbcbd3b955aef6d71a2 Mon Sep 17 00:00:00 2001 From: marzavec Date: Sat, 10 Mar 2018 22:41:17 -0800 Subject: stabilized modules and server cmd field --- server/src/commands/admin/listusers.js | 1 - server/src/commands/admin/reload.js | 4 ++-- server/src/commands/admin/saveconfig.js | 6 +++++- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'server/src/commands/admin') 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' }; -- cgit v1.2.1