diff --git a/modules/admin/commands.js b/modules/admin/commands.js index 5ab67f9..51e371e 100644 --- a/modules/admin/commands.js +++ b/modules/admin/commands.js @@ -4,6 +4,29 @@ var fs = require('fs'), exec = require('child_process').exec; var commands = function(dbot) { + var getCurrentConfigPath = function(configKey) { + var configKey = configKey.split('.'); + + defaultConfigPath = dbot.config; + userConfigPath = dbot.db.config; + for(var i=0;i " + newOption); - userConfigPath[configItem] = newOption; + event.reply(configPathString + ": " + currentOption + " -> " + newOption); + userConfigPath[configKey] = newOption; dbot.reloadModules(); } }; @@ -196,6 +213,7 @@ var commands = function(dbot) { commands['reload'].access = 'admin'; commands['unload'].access = 'admin'; commands['load'].access = 'admin'; + commands['setconfig'].access = 'admin'; commands['join'].access = 'moderator'; commands['part'].access = 'moderator'; commands['opme'].access = 'moderator';