output in setconfig fix

This commit is contained in:
reality 2013-07-24 22:33:03 +00:00
parent 9bc4128e3a
commit 0c6fdf826f

View File

@ -185,11 +185,12 @@ var commands = function(dbot) {
event.reply(dbot.t("config_array", { "alternate": "pushconfig" })); event.reply(dbot.t("config_array", { "alternate": "pushconfig" }));
} }
} else { } else {
event.reply(dbot.t("no_config_key", {'path': configPath}));
configPath = configPath.split('.'); configPath = configPath.split('.');
if(_.has(dbot.config.modules, configPath[0])) { if(_.has(dbot.config.modules, configPath[0])) {
configPath.splice(0, 0, 'modules'); configPath.splice(0, 0, 'modules');
event.params[1] = configPath.join('.'); event.params[1] = configPath.join('.');
this.commands['~showconfig'](event); this.commands['~setconfig'](event);
return; return;
} else { } else {
event.reply(dbot.t('new_config_key', { 'key': configPath })); event.reply(dbot.t('new_config_key', { 'key': configPath }));