diff options
author | Neel Kamath <neelkamath@protonmail.com> | 2018-05-13 12:39:55 +0200 |
---|---|---|
committer | Neel Kamath <neelkamath@protonmail.com> | 2018-05-13 12:39:55 +0200 |
commit | 2bb5ced363b692a5696b176bc317fe525c0c05df (patch) | |
tree | 1532d9456c5f2b25ac05f7cec620a3af890eff83 /server/src/commands/admin/saveconfig.js | |
parent | Re-add module documentation (diff) | |
download | hackchat-2bb5ced363b692a5696b176bc317fe525c0c05df.tar.gz hackchat-2bb5ced363b692a5696b176bc317fe525c0c05df.zip |
Flatten
Diffstat (limited to 'server/src/commands/admin/saveconfig.js')
-rw-r--r-- | server/src/commands/admin/saveconfig.js | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/server/src/commands/admin/saveconfig.js b/server/src/commands/admin/saveconfig.js deleted file mode 100644 index ed3a312..0000000 --- a/server/src/commands/admin/saveconfig.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - Description: Writes any changes to the config to the disk -*/ - -exports.run = async (core, server, socket, data) => { - if (socket.uType != 'admin') { - // ignore if not admin - return; - } - - let saveResult = core.managers.config.save(); - - if (!saveResult) { - server.reply({ - cmd: 'warn', - text: 'Failed to save config, check logs.' - }, client); - - return; - } - - server.reply({ - cmd: 'info', - text: 'Config saved!' - }, socket); - - server.broadcast({ - cmd: 'info', - text: 'Config saved!' - }, { uType: 'mod' }); -}; - -exports.info = { - name: 'saveconfig', - description: 'Saves current config' -}; |