From b21c3e432f4557233f1fbabc26be6ca3659af443 Mon Sep 17 00:00:00 2001 From: rainyday Date: Fri, 26 Nov 2010 08:37:04 +0800 Subject: [PATCH] Cleaned up sieve.py a little. --- plugins/sieve.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/plugins/sieve.py b/plugins/sieve.py index feecac4..b415d07 100644 --- a/plugins/sieve.py +++ b/plugins/sieve.py @@ -12,6 +12,11 @@ def sieve_suite(bot, input, func, kind, args): if kind == "command": if input.trigger in bot.config.get('disabled_commands', []): return None + + ignored = bot.config.get('ignored', []); + if input.host in ignored or input.nick in ignored: + return None + fn = re.match(r'^plugins.(.+).py$', func._filename) disabled = bot.config.get('disabled_plugins', []) @@ -35,10 +40,4 @@ def sieve_suite(bot, input, func, kind, args): if input.host not in admins and input.nick not in admins: return None - if kind == "command": - ignored = bot.config.get('ignored', []); - - if input.host in ignored or input.nick in ignored: - return None - return input