diff --git a/exec/ircbot.js b/exec/ircbot.js index 0270fc9848a015844fd4a3975bde45cbe828bb29..bbd894e14799308da6cbc6e7fe6020a0728d8503 100644 --- a/exec/ircbot.js +++ b/exec/ircbot.js @@ -60,16 +60,16 @@ if (config.open("r")) { var ini_modules = config.iniGetSections("module_"); for (var m in ini_modules) { var mysec = ini_modules[m]; - Modules[mysec]=new Object(); - Modules[mysec].Bot_Commands=new Object(); - Modules[mysec].dir=config.iniGetValue(mysec,"dir"); - Modules[mysec].name=config.iniGetValue(mysec,"name"); - Modules[mysec].load=directory(Modules[mysec].dir+"*.js"); - Modules[mysec].lib=[]; + var module_name=config.iniGetValue(mysec,"name"); + Modules[module_name]=new Object(); + Modules[module_name].Bot_Commands=new Object(); + Modules[module_name].dir=config.iniGetValue(mysec,"dir"); + Modules[module_name].load=directory(Modules[module_name].dir+"*.js"); + Modules[module_name].lib=[]; var lib_list=config.iniGetValue(mysec,"lib"); if(lib_list) { lib_list=lib_list.split(","); - for(var l in lib_list) Modules[mysec].lib.push(removeSpaces(lib_list[l])); + for(var l in lib_list) Modules[module_name].lib.push(removeSpaces(lib_list[l])); } } diff --git a/exec/load/ircbot_commands.js b/exec/load/ircbot_commands.js index 9479feae3f5e85c8cf734b67218a68e34cdf81f6..189368df975cf98d2fa747c1a9dffbf5c29dbe02 100644 --- a/exec/load/ircbot_commands.js +++ b/exec/load/ircbot_commands.js @@ -137,7 +137,7 @@ Bot_Commands["HELP"].command = function (target,onick,ouh,srv,lvl,cmd) { srv.o(onick,"Command usage: " + get_cmd_prefix() + "<command> <arguments>"); list_out(Bot_Commands,"MAIN"); for(var m in Modules) { - list_out(Modules[m].Bot_Commands,Modules[m].name.toUpperCase()); + list_out(Modules[m].Bot_Commands,m.toUpperCase()); } } return; @@ -201,3 +201,4 @@ Bot_Commands["PREFIX"].command = function (target,onick,ouh,srv,lvl,cmd) { } return; } +