mirror of
https://github.com/reality/dbot.git
synced 2025-05-02 22:27:33 +02:00
it's an array not an object...
This commit is contained in:
parent
9856fdc5b2
commit
77db61b02d
@ -39,7 +39,10 @@ var adminCommands = function(dbot) {
|
|||||||
if(dbot.moduleNames.include(params[1])) {
|
if(dbot.moduleNames.include(params[1])) {
|
||||||
var cacheKey = require.resolve('../modules/' + params[1]);
|
var cacheKey = require.resolve('../modules/' + params[1]);
|
||||||
delete require.cache[cacheKey];
|
delete require.cache[cacheKey];
|
||||||
delete dbot.moduleNames[params[1]];
|
|
||||||
|
var moduleIndex = dbot.moduleNames.indexOf(params[1]);
|
||||||
|
dbot.moduleNames.splice(moduleIndex, 1);
|
||||||
|
|
||||||
dbot.reloadModules();
|
dbot.reloadModules();
|
||||||
dbot.say(data.channel, 'Turned off module: ' + params[1]);
|
dbot.say(data.channel, 'Turned off module: ' + params[1]);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user