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:
parent
224663f6e8
commit
4480a3b44a
|
@ -155,4 +155,5 @@ class Bot(irc.client.SimpleIRCClient, Logger):
|
|||
callbacks = plugin.callbacks
|
||||
if etype not in callbacks:
|
||||
continue
|
||||
callbacks[etype](event)
|
||||
if callbacks[etype](event):
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue