Add basic ignore functionality

master
mutantmonkey 2011-09-07 19:30:30 -04:00
parent b9c2193eb2
commit 4b9215a202
2 changed files with 5 additions and 0 deletions

3
bot.py
View File

@ -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:

2
phenny
View File

@ -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
#