mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
callbacks: Allow Plugin.noIgnore to be a function instead of a boolean.
This commit is contained in:
parent
a39a6d247d
commit
86d9f49aa5
@ -1341,7 +1341,11 @@ class PluginMixin(BasePlugin, irclib.IrcCallback):
|
||||
def __call__(self, irc, msg):
|
||||
irc = SimpleProxy(irc, msg)
|
||||
if msg.command == 'PRIVMSG':
|
||||
if self.noIgnore or \
|
||||
if hasattr(self.noIgnore, '__call__'):
|
||||
noIgnore = self.noIgnore(irc, msg)
|
||||
else:
|
||||
noIgnore = self.noIgnore
|
||||
if noIgnore or \
|
||||
not ircdb.checkIgnored(msg.prefix, msg.args[0]) or \
|
||||
not ircutils.isUserHostmask(msg.prefix): # Some services impl.
|
||||
self.__parent.__call__(irc, msg)
|
||||
|
Loading…
Reference in New Issue
Block a user