From e01519e8b796b173fcfa1841e616a4f1292f1097 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 3 Oct 2012 13:48:12 -0400 Subject: [PATCH] zephyr_mirror: Drop PING messages earlier. This simplified debugging. (imported from commit 4571901a5349d5ec1ec9246c94edb65e016160ac) --- zephyr_mirror.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/zephyr_mirror.py b/zephyr_mirror.py index 763625d..c06bb5e 100644 --- a/zephyr_mirror.py +++ b/zephyr_mirror.py @@ -159,6 +159,11 @@ def process_loop(log): zsig, body = notice.message.split("\x00", 1) is_personal = False is_huddle = False + + if notice.opcode != "": + # skip PING messages + continue + if isinstance(zsig, str): # Check for width unicode character u'\u200B'.encode("utf-8") if u'\u200B'.encode("utf-8") in zsig: @@ -180,10 +185,6 @@ def process_loop(log): huddle_recipients_list.append(sender) huddle_recipients = ",".join(huddle_recipients_list) - if notice.opcode != "": - # skip PING messages - continue - # Drop messages not to the listed subscriptions if (notice.cls.lower() not in mit_subs_list.all_subs) and not \ (is_personal and options.forward_personals):