From 02f6fbf70153241ce45b9c880664566f2d1ede86 Mon Sep 17 00:00:00 2001 From: marzavec Date: Sat, 2 Feb 2019 13:34:06 -0800 Subject: Minor module changes Added trips to listusers output. Added 'reason' to reload broadcast. Fixed removemod bug. Added /nick hook to changenick. Added 'type' and 'from' fields to invite event. --- server/src/commands/admin/reload.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'server/src/commands/admin/reload.js') diff --git a/server/src/commands/admin/reload.js b/server/src/commands/admin/reload.js index f7f7464..f40d0b2 100644 --- a/server/src/commands/admin/reload.js +++ b/server/src/commands/admin/reload.js @@ -19,9 +19,14 @@ exports.run = async (core, server, socket, data) => { // build reply based on reload results if (loadResult == '') { - loadResult = `Loaded ${core.commands._commands.length} commands, 0 errors`; + loadResult = `Reloaded ${core.commands._commands.length} commands, 0 errors`; } else { - loadResult = `Loaded ${core.commands._commands.length} commands, error(s): ${loadResult}`; + loadResult = `Reloaded ${core.commands._commands.length} commands, error(s): + ${loadResult}`; + } + + if (typeof data.reason !== 'undefined') { + loadResult += `\nReason: ${data.reason}`; } // reply with results @@ -42,5 +47,5 @@ exports.info = { name: 'reload', description: '(Re)loads any new commands into memory, outputs errors if any', usage: ` - API: { cmd: 'reload' }` + API: { cmd: 'reload', reason: '' }` }; -- cgit v1.2.1