From f532aee4ab27e9df9a1f441feb27bcf9a08aafa5 Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 14 Jan 2013 23:02:55 +0000 Subject: [PATCH] fix up ignore [#131] --- modules/ignore/ignore.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/modules/ignore/ignore.js b/modules/ignore/ignore.js index a3c99cd..b224777 100644 --- a/modules/ignore/ignore.js +++ b/modules/ignore/ignore.js @@ -72,22 +72,20 @@ var ignore = function(dbot) { } }; - return { - 'name': 'ignore', - 'ignorable': false, - 'commands': commands, + this.name = 'ignore'; + this.ignorable = false; + this.commands = commands; - 'onLoad': function() { - dbot.instance.clearIgnores(); - _.each(dbot.db.ignores, function(ignores, user) { - _.each(ignores, function(ignore) { - dbot.instance.ignoreTag(user, ignore); - }, this); + this.onLoad = function() { + dbot.instance.clearIgnores(); + _.each(dbot.db.ignores, function(ignores, user) { + _.each(ignores, function(ignore) { + dbot.instance.ignoreTag(user, ignore); }, this); - } + }, this); }; }; exports.fetch = function(dbot) { - return ignore(dbot); + return new ignore(dbot); };