bot: stop plugin callbacks on the first success

When a plugin callbacks successfully handles an event it returns True,
and it now stops processing callbacks. It may be changed later to handle
multiple callbacks per event.
This commit is contained in:
dece 2020-11-02 16:44:35 +01:00
parent 224663f6e8
commit 4480a3b44a

View file

@ -155,4 +155,5 @@ class Bot(irc.client.SimpleIRCClient, Logger):
callbacks = plugin.callbacks callbacks = plugin.callbacks
if etype not in callbacks: if etype not in callbacks:
continue continue
callbacks[etype](event) if callbacks[etype](event):
break