From ad7704c49f6e5794d615a027061e008b75ac83e1 Mon Sep 17 00:00:00 2001 From: Val Lorentz Date: Sun, 17 Dec 2023 19:54:40 +0100 Subject: [PATCH] RelayNext: Fix error when receiving PMs (#113) 2bd13fa0680572c0940ab249d2aa693453aa1787 replaced `msg.args[0]` with `msg.channel`, but the latter is `None` on PMs. Additionally, `irc.state.channels.__contains__` performs normalization itself (and using RFC1459 normalization rather than Unicode), so it is not needed to normalize this early. --- RelayNext/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RelayNext/plugin.py b/RelayNext/plugin.py index 9d11218..ee26c51 100644 --- a/RelayNext/plugin.py +++ b/RelayNext/plugin.py @@ -292,10 +292,10 @@ class RelayNext(callbacks.Plugin): return True def relay(self, irc, msg, channel, isAnnouncement=False): - channel = channel.lower() self.log.debug("RelayNext (%s): got channel %s", irc.network, channel) if not channel in irc.state.channels: return + channel = channel.lower() # Check for ignored events first. Checking for "'.' not in msg.nick" is for skipping # ignore checks from servers.