From 3878ae9e0df4158ae516f8e64f28ac1a6ea6c1af Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 8 Aug 2016 21:05:55 -0700 Subject: [PATCH] relay_clientbot: skip to next channel for SQUIT payloads if no nicks are affected --- plugins/relay_clientbot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/relay_clientbot.py b/plugins/relay_clientbot.py index 8b6cb9b..8bfa10f 100644 --- a/plugins/relay_clientbot.py +++ b/plugins/relay_clientbot.py @@ -129,6 +129,10 @@ def cb_relay_core(irc, source, command, args): if type(nicklist) == collections.defaultdict: nicklist = nicklist.get(channel, []) + # Ignore if no nicks are affected on the channel. + if not nicklist: + continue + colored_nicks = [color_text(nick) for nick in nicklist] # Join both the nicks and colored_nicks fields into a comma separated string.