Delete the pages module cache for a module if it exists

This commit is contained in:
reality 2013-01-07 12:49:18 +00:00
parent 4c3887aa02
commit eb526b18c5

8
run.js
View File

@ -151,6 +151,14 @@ DBot.prototype.reloadModules = function() {
var cacheKey = require.resolve(moduleDir + name); var cacheKey = require.resolve(moduleDir + name);
delete require.cache[cacheKey]; delete require.cache[cacheKey];
try {
var webKey = require.resolve(moduleDir + 'web');
} catch(err) {
}
if(webKey) {
delete require.cache[webKey];
}
try { try {
// Load the module config data // Load the module config data
try { try {