From ebaa3466198de1d186d1cd8df1a1961dab96167b Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Wed, 22 Sep 2021 21:48:59 +0200 Subject: [PATCH] callbacks: Don't raise AssertionError when addressd() is called with a NOTICE Some plugins (like LinkRelay) share code between NOTICE and PRIVMSG and they might call it unconditionally. --- src/callbacks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/callbacks.py b/src/callbacks.py index 86aa98915..c2c8e9464 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -80,6 +80,8 @@ def _addressed(irc, msg, prefixChars=None, nicks=None, payload = payload[len(prefixString):].lstrip() return payload + if msg.command == 'NOTICE': + return '' assert msg.command in ('PRIVMSG', 'TAGMSG'), msg.command target = msg.channel or msg.args[0] if not payload: