From a25620bf9e931ba7eb1175f4ce1acd29a2012f60 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 4 Jun 2013 00:06:41 +0000 Subject: [PATCH] recursively call showconfig [#489] --- modules/admin/admin.js | 55 +++++++++----------------------------- modules/admin/commands.js | 10 ++++--- modules/admin/strings.json | 6 ++--- 3 files changed, 22 insertions(+), 49 deletions(-) diff --git a/modules/admin/admin.js b/modules/admin/admin.js index 93a0ae5..77e7668 100644 --- a/modules/admin/admin.js +++ b/modules/admin/admin.js @@ -9,52 +9,21 @@ var fs = require('fs'), var admin = function(dbot) { this.internalAPI = { 'getCurrentConfig': function(configKey, callback) { - if(configKey) { - this.db.read('config', configKey, function(err, cRecord) { - if(cRecord) { - callback(cRecord.value) - } else { - var configPath = dbot.config; - configKey = configKey.split('.'); + var configPath = dbot.config; + configKey = configKey.split('.'); - for(var i=0;i