Add basic ignore functionality
parent
b9c2193eb2
commit
4b9215a202
3
bot.py
3
bot.py
|
@ -203,6 +203,9 @@ class Phenny(irc.Bot):
|
||||||
bytes, event, args = args[0], args[1], args[2:]
|
bytes, event, args = args[0], args[1], args[2:]
|
||||||
text = decode(bytes)
|
text = decode(bytes)
|
||||||
|
|
||||||
|
if origin.nick in self.config.ignore:
|
||||||
|
return
|
||||||
|
|
||||||
for priority in ('high', 'medium', 'low'):
|
for priority in ('high', 'medium', 'low'):
|
||||||
items = self.commands[priority].items()
|
items = self.commands[priority].items()
|
||||||
for regexp, funcs in items:
|
for regexp, funcs in items:
|
||||||
|
|
2
phenny
2
phenny
|
@ -41,6 +41,8 @@ def create_default_config(fn):
|
||||||
# But admin.py is disabled by default, as follows:
|
# But admin.py is disabled by default, as follows:
|
||||||
exclude = ['admin']
|
exclude = ['admin']
|
||||||
|
|
||||||
|
ignore = ['']
|
||||||
|
|
||||||
# If you want to enumerate a list of modules rather than disabling
|
# If you want to enumerate a list of modules rather than disabling
|
||||||
# some, use "enable = ['example']", which takes precedent over exclude
|
# some, use "enable = ['example']", which takes precedent over exclude
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue