forked from GitHub/dbot
auto modules prefix in ~showconfig [#520]
This commit is contained in:
parent
1d9c7fd40e
commit
c1a63d331a
@ -244,8 +244,14 @@ var commands = function(dbot) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
event.reply(dbot.t("no_config_key", {'path': configPath}));
|
event.reply(dbot.t("no_config_key", {'path': configPath}));
|
||||||
|
|
||||||
configPath = configPath.split('.');
|
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('.');
|
event.params[1] = configPath.join('.');
|
||||||
this.commands['~showconfig'](event);
|
this.commands['~showconfig'](event);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user