From 546ce647077bc510f8da1e724e6c9826e955a8cd Mon Sep 17 00:00:00 2001 From: reality Date: Wed, 5 Jun 2013 21:41:20 +0000 Subject: [PATCH] admin.internalAPI.setConfig operational [#489] --- modules/admin/admin.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/admin/admin.js b/modules/admin/admin.js index 9f45f13..113cb0d 100644 --- a/modules/admin/admin.js +++ b/modules/admin/admin.js @@ -1,7 +1,7 @@ /** * Module Name: Admin * Description: Set of commands which only one who is a DepressionBot - * administrator can run - as such, it has its own command execution listener. + * administrator can run. */ var fs = require('fs'), _ = require('underscore')._; @@ -25,21 +25,26 @@ var admin = function(dbot) { }, 'setConfig': function(configKey, newOption, callback) { - var configPath = dbot.customConfig; + var configPath = dbot.customConfig, + oldOption = null; configKey = configKey.split('.'); for(var i=0;i