[2894] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[PATCH] Append "[UNAUTH]" to displayed sender for unauthenticated zephyrs

daemon@ATHENA.MIT.EDU (Adam Glasgall)
Thu Feb 10 19:08:05 2011

From: Adam Glasgall <adam@crossproduct.net>
To: barnowl-dev@mit.edu
Cc: Adam Glasgall <adam@crossproduct.net>
Date: Thu, 10 Feb 2011 19:07:54 -0500

This patch extends the default style to indicate if a zephyr message
is unauthenticated. I'm not closely attached to the precise way in
which it's indicated (in particular, people on -c barnowl pointed out
that it's confusingly similar to how the opcode is displayed, but the
general consensus does seem to be that we should be displaying this
information.
---
 perl/lib/BarnOwl/Style/Default.pm |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/perl/lib/BarnOwl/Style/Default.pm b/perl/lib/BarnOwl/Style/Default.pm
index 96ded0d..bfee282 100644
--- a/perl/lib/BarnOwl/Style/Default.pm
+++ b/perl/lib/BarnOwl/Style/Default.pm
@@ -104,6 +104,9 @@ sub chat_header {
             $header .= ' / ' . $self->humanize($m->subcontext, 1);
         }
         $header .= ' / @b{' . maybe($m->pretty_sender) . '}';
+       if(defined($m->auth) && ($m->auth ne "YES")) {
+           $header .= " [UNAUTH]";
+       }
     }
 
     if($m->opcode) {
-- 
1.7.1


home help back first fref pref prev next nref lref last post