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)) {
event.reply(configPath + ": " + config + " << " + newOption);
config.push(newOption);
this.db.save('config', configPath, {
'key': configPath,
'value': config
}, function(err) {
dbot.reloadModules();
});
this.internalAPI.setConfig(configPath, config, function(err) {});
} else {
event.reply(dbot.t("config_array", { "alternate": "setconfig" }));
}
} else {
event.reply(dbot.t("no_config_key"));
event.reply(dbot.t("no_config_key", { 'path': configPath }));
}
}.bind(this));
} else {