auto modules prefix in ~showconfig [#520]

This commit is contained in:
reality 2013-06-30 18:25:45 +00:00
parent 1d9c7fd40e
commit c1a63d331a

View File

@ -244,8 +244,14 @@ var commands = function(dbot) {
}
} else {
event.reply(dbot.t("no_config_key", {'path': configPath}));
configPath = configPath.split('.');
configPath.pop();
if(_.has(dbot.config.modules, configPath[0])) {
configPath.splice(0, 0, 'modules');
} else {
configPath.pop();
}
event.params[1] = configPath.join('.');
this.commands['~showconfig'](event);
}