[2895] in BarnOwl Developers
[PATCH] Prepend "UNAUTH: " to displayed sender for unauthenticated zephyrs
daemon@ATHENA.MIT.EDU (Nelson Elhage)
Thu Feb 10 20:47:43 2011
From: Nelson Elhage <nelhage@ksplice.com>
To: barnowl-dev@mit.edu
Cc: Adam Glasgall <adam@crossproduct.net>
Date: Thu, 10 Feb 2011 20:47:32 -0500
In-Reply-To: <1297382874-17200-1-git-send-email-adam@crossproduct.net>
From: Adam Glasgall <adam@crossproduct.net>
This patch extends the default style to indicate if a zephyr message
is unauthenticated.
[nelhage@nelhage.com: Tweak the styling slightly]
---
At risk of bikeshedding, how do we feel about this [untested]?
perl/lib/BarnOwl/Style/Default.pm | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/perl/lib/BarnOwl/Style/Default.pm b/perl/lib/BarnOwl/Style/Default.pm
index 96ded0d..11adbd0 100644
--- a/perl/lib/BarnOwl/Style/Default.pm
+++ b/perl/lib/BarnOwl/Style/Default.pm
@@ -103,7 +103,11 @@ sub chat_header {
if(defined $m->subcontext) {
$header .= ' / ' . $self->humanize($m->subcontext, 1);
}
- $header .= ' / @b{' . maybe($m->pretty_sender) . '}';
+ $header .= ' / ';
+ if(defined($m->auth) && ($m->auth ne "YES")) {
+ $header .= "UNAUTH: ";
+ }
+ $header .= '@b{' . maybe($m->pretty_sender) . '}';
}
if($m->opcode) {
--
1.7.2.43.g36c08.dirty