diff --git a/modules/ignore/ignore.js b/modules/ignore/ignore.js index b6f78d0..14fdd5a 100644 --- a/modules/ignore/ignore.js +++ b/modules/ignore/ignore.js @@ -7,11 +7,9 @@ var ignore = function(dbot) { var commands = { '~ignore': function(event) { - var ignorableModules = []; - - dbot.modules.each(function(module) { + var ignorableModules = dbot.modules.filter(function(module) { if(module.ignorable != null && module.ignorable == true) { - ignorableModules.push(module.name); + return true; } }); var module = event.params[1]; diff --git a/run.js b/run.js index abeb17c..da148d3 100644 --- a/run.js +++ b/run.js @@ -226,6 +226,9 @@ DBot.prototype.reloadModules = function() { // Invalid or no string info } + module.toString = function() { + return this.name; + } this.modules[module.name] = module; } catch(err) { console.log(this.t('module_load_error', {'moduleName': name}));