From 4480a3b44a1e33c93419c546f8c1dde6a625fdfd Mon Sep 17 00:00:00 2001 From: dece Date: Mon, 2 Nov 2020 16:44:35 +0100 Subject: [PATCH] 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. --- edmond/bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/edmond/bot.py b/edmond/bot.py index d2b2821..8946cb7 100644 --- a/edmond/bot.py +++ b/edmond/bot.py @@ -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