3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-18 08:32:42 +01:00

wrong params thing in unload

This commit is contained in:
Luke Slater 2012-02-14 00:35:02 +00:00
parent 7aeb2f0fbb
commit 9b4aba39b1

View File

@ -37,7 +37,7 @@ var adminCommands = function(dbot) {
'unload': function(data, params) { 'unload': function(data, params) {
if(dbot.moduleNames.include(params[1])) { if(dbot.moduleNames.include(params[1])) {
var cacheKey = require.resolve('./modules/' + name); var cacheKey = require.resolve('./modules/' + params[1]);
delete require.cache[cacheKey]; delete require.cache[cacheKey];
delete dbot.moduleNames[params[1]]; delete dbot.moduleNames[params[1]];
dbot.reloadModules(); dbot.reloadModules();