3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00

pushconfig operational [#489]

This commit is contained in:
reality 2013-06-05 22:15:17 +00:00
parent 815d7a39cd
commit 7592a6caa4

View File

@ -208,17 +208,12 @@ var commands = function(dbot) {
if(_.isArray(config)) { if(_.isArray(config)) {
event.reply(configPath + ": " + config + " << " + newOption); event.reply(configPath + ": " + config + " << " + newOption);
config.push(newOption); config.push(newOption);
this.db.save('config', configPath, { this.internalAPI.setConfig(configPath, config, function(err) {});
'key': configPath,
'value': config
}, function(err) {
dbot.reloadModules();
});
} else { } else {
event.reply(dbot.t("config_array", { "alternate": "setconfig" })); event.reply(dbot.t("config_array", { "alternate": "setconfig" }));
} }
} else { } else {
event.reply(dbot.t("no_config_key")); event.reply(dbot.t("no_config_key", { 'path': configPath }));
} }
}.bind(this)); }.bind(this));
} else { } else {