From 135f7f1b57c4d0a3ac9b2dd966835aef40883bf6 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 26 Nov 2012 14:50:38 -0500 Subject: [PATCH] zephyr_mirror: Use default format to indicate what came from Humbug. (imported from commit 5c2fdccb08d605a37d6c87c37f023c06a0a9a760) --- bots/zephyr_mirror_backend.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index 312ec82..06cb5fe 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -237,7 +237,7 @@ def process_notice(notice, log): # skip PING messages return - if zsig.endswith("@(@color(blue))"): + if zsig.endswith("@(@color(blue))") or notice.format.endswith("@(@color(blue))"): logger.debug("Skipping message we got from Humbug!") return @@ -396,7 +396,9 @@ def forward_to_zephyr(message): wrapped_content = "\n".join("\n".join(wrapper.wrap(line)) for line in message["content"].split("\n")) - zwrite_args = ["zwrite", "-s", zsig] + zwrite_args = ["zwrite", "-s", zsig, "-F", "Class $class, Instance $instance:\n" + + "To: @bold($recipient) at $time $date\n" + + "From: @bold{$1 <$sender>}\n\n$2@(@color(blue))"] logger.info("Forwarding message from %s" % (message["sender_email"],)) if message['type'] == "stream": zephyr_class = message["display_recipient"]