aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/admin
diff options
context:
space:
mode:
authormarzavec <admin@marzavec.com>2019-03-19 07:36:21 +0100
committermarzavec <admin@marzavec.com>2019-03-19 07:36:21 +0100
commitc634e03cb553e21158fddc6d4221a54aa799de79 (patch)
tree74f303d4ab65b08c7ec316fb713146cc99024c00 /server/src/commands/admin
parentMerge pull request #56 from paulgreg/manifest (diff)
downloadhackchat-c634e03cb553e21158fddc6d4221a54aa799de79.tar.gz
hackchat-c634e03cb553e21158fddc6d4221a54aa799de79.zip
refactoring 1 of 2
Diffstat (limited to 'server/src/commands/admin')
-rw-r--r--server/src/commands/admin/addmod.js2
-rw-r--r--server/src/commands/admin/reload.js2
-rw-r--r--server/src/commands/admin/saveconfig.js2
3 files changed, 3 insertions, 3 deletions
diff --git a/server/src/commands/admin/addmod.js b/server/src/commands/admin/addmod.js
index c4fcdd5..a30b175 100644
--- a/server/src/commands/admin/addmod.js
+++ b/server/src/commands/admin/addmod.js
@@ -10,7 +10,7 @@ exports.run = async (core, server, socket, data) => {
}
// add new trip to config
- core.config.mods.push({ trip: data.trip }); // purposely not using `config.set()` to avoid auto-save
+ core.config.mods.push({ trip: data.trip });
// find targets current connections
let newMod = server.findSockets({ trip: data.trip });
diff --git a/server/src/commands/admin/reload.js b/server/src/commands/admin/reload.js
index 947f9d9..27be19c 100644
--- a/server/src/commands/admin/reload.js
+++ b/server/src/commands/admin/reload.js
@@ -10,7 +10,7 @@ exports.run = async (core, server, socket, data) => {
}
// do command reload and store results
- let loadResult = core.managers.dynamicImports.reloadDirCache('src/commands');
+ let loadResult = core.dynamicImports.reloadDirCache('src/commands');
loadResult += core.commands.loadCommands();
// clear and rebuild all module hooks
diff --git a/server/src/commands/admin/saveconfig.js b/server/src/commands/admin/saveconfig.js
index b8a769b..a95a39a 100644
--- a/server/src/commands/admin/saveconfig.js
+++ b/server/src/commands/admin/saveconfig.js
@@ -10,7 +10,7 @@ exports.run = async (core, server, socket, data) => {
}
// attempt save, notify of failure
- if (!core.managers.config.save()) {
+ if (!core.configManager.save()) {
return server.reply({
cmd: 'warn',
text: 'Failed to save config, check logs.'