aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/admin/saveconfig.js
diff options
context:
space:
mode:
authorNeel Kamath <neelkamath@protonmail.com>2018-05-13 12:39:55 +0200
committerNeel Kamath <neelkamath@protonmail.com>2018-05-13 12:39:55 +0200
commit2bb5ced363b692a5696b176bc317fe525c0c05df (patch)
tree1532d9456c5f2b25ac05f7cec620a3af890eff83 /server/src/commands/admin/saveconfig.js
parentRe-add module documentation (diff)
downloadhackchat-2bb5ced363b692a5696b176bc317fe525c0c05df.tar.gz
hackchat-2bb5ced363b692a5696b176bc317fe525c0c05df.zip
Flatten
Diffstat (limited to 'server/src/commands/admin/saveconfig.js')
-rw-r--r--server/src/commands/admin/saveconfig.js36
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'
-};