diff --git a/modules/admin.js b/modules/admin.js index 03a87f0..b938de8 100644 --- a/modules/admin.js +++ b/modules/admin.js @@ -37,7 +37,7 @@ var adminCommands = function(dbot) { 'unload': function(data, params) { if(dbot.moduleNames.include(params[1])) { - var cacheKey = require.resolve('./modules/' + name); + var cacheKey = require.resolve('./modules/' + params[1]); delete require.cache[cacheKey]; delete dbot.moduleNames[params[1]]; dbot.reloadModules();