it's an array not an object...

This commit is contained in:
Luke Slater 2012-02-14 00:41:34 +00:00
parent 9856fdc5b2
commit 77db61b02d

View File

@ -39,7 +39,10 @@ var adminCommands = function(dbot) {
if(dbot.moduleNames.include(params[1])) {
var cacheKey = require.resolve('../modules/' + params[1]);
delete require.cache[cacheKey];
delete dbot.moduleNames[params[1]];
var moduleIndex = dbot.moduleNames.indexOf(params[1]);
dbot.moduleNames.splice(moduleIndex, 1);
dbot.reloadModules();
dbot.say(data.channel, 'Turned off module: ' + params[1]);
} else {