|
|
|
@ -151,7 +151,9 @@ class Bot(irc.client.SimpleIRCClient, Logger):
|
|
|
|
|
def run_plugin_callbacks(self, event):
|
|
|
|
|
"""Run appropriate callbacks for each plugin."""
|
|
|
|
|
etype = event.type
|
|
|
|
|
for plugin in filter(lambda p: p.is_ready, self.plugins):
|
|
|
|
|
plugins = filter(lambda p: p.is_ready, self.plugins)
|
|
|
|
|
plugins = sorted(plugins, key=lambda p: p.priority, reverse=True)
|
|
|
|
|
for plugin in plugins:
|
|
|
|
|
callbacks = plugin.callbacks
|
|
|
|
|
if etype not in callbacks:
|
|
|
|
|
continue
|
|
|
|
|