From 4b9215a202c6c6c4f6fc2b9c9e0683c254a64fd8 Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Wed, 7 Sep 2011 19:30:30 -0400 Subject: [PATCH] Add basic ignore functionality --- bot.py | 3 +++ phenny | 2 ++ 2 files changed, 5 insertions(+) diff --git a/bot.py b/bot.py index 21b8529..ebafa68 100755 --- a/bot.py +++ b/bot.py @@ -203,6 +203,9 @@ class Phenny(irc.Bot): bytes, event, args = args[0], args[1], args[2:] text = decode(bytes) + if origin.nick in self.config.ignore: + return + for priority in ('high', 'medium', 'low'): items = self.commands[priority].items() for regexp, funcs in items: diff --git a/phenny b/phenny index 68a5129..dc8eac6 100755 --- a/phenny +++ b/phenny @@ -41,6 +41,8 @@ def create_default_config(fn): # But admin.py is disabled by default, as follows: exclude = ['admin'] + ignore = [''] + # If you want to enumerate a list of modules rather than disabling # some, use "enable = ['example']", which takes precedent over exclude #