From 42361e0c0c605a97fcd0e5b4a43e12eab6c1befc Mon Sep 17 00:00:00 2001 From: John Maguire Date: Thu, 21 Mar 2013 06:40:54 -0400 Subject: [PATCH] adding support for wildcard ~ignore and ~unignore --- modules/ignore/ignore.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ignore/ignore.js b/modules/ignore/ignore.js index 6e8590c..3e3d974 100644 --- a/modules/ignore/ignore.js +++ b/modules/ignore/ignore.js @@ -24,7 +24,7 @@ var ignore = function(dbot) { 'modules': ignorableModules.join(', ') })); } else { - if(_.include(ignorableModules, module)) { + if(module == '*' || _.include(ignorableModules, module)) { if(_.has(dbot.db.ignores, event.user) && _.include(dbot.db.ignores[event.user], module)) { event.reply(dbot.t('already_ignoring', { 'user': event.user })); } else { @@ -137,7 +137,7 @@ var ignore = function(dbot) { var module = event.params[2]; // Ignoring the value of 'ignorable' at the moment - if(_.include(dbot.config.moduleNames, module)) { + if(module == '*' || _.include(dbot.config.moduleNames, module)) { if(!_.has(dbot.db.ignores, channel)) dbot.db.ignores[channel] = []; if(!_.include(dbot.db.ignores[channel], module)) { dbot.db.ignores[channel].push(module);