[1301] in BarnOwl Developers

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

[PATCH] Only use zsender when not sending personals.

daemon@ATHENA.MIT.EDU (Chris Lesniewski-Laas)
Thu Oct 29 18:15:09 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@lunatique.mit.edu
Date: Thu, 19 Feb 2009 20:37:12 -0500
From: Chris Lesniewski-Laas <ctl@MIT.EDU>
To: barnowl-dev@mit.edu

This is what git format-patch -1 gave me.
I notice geofft created the original zsender patch.  I'm not sure if this
matches his use case, but it is the mode I use.

Chris

---
 zephyr.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/zephyr.c b/zephyr.c
index c112f56..5e1a068 100644
--- a/zephyr.c
+++ b/zephyr.c
@@ -636,16 +636,15 @@ int send_zephyr(char *opcode, char *zsig, char *class, char *instance, char *rec
   notice.z_port=0;
   notice.z_class=class;
   notice.z_class_inst=instance;
+  notice.z_sender=NULL;
   if (!strcmp(recipient, "*") || !strcmp(recipient, "@")) {
     notice.z_recipient="";
+    if (*owl_global_get_zsender(&g))
+        notice.z_sender=owl_global_get_zsender(&g);
   } else {
     notice.z_recipient=recipient;
   }
   notice.z_default_format="Class $class, Instance $instance:\nTo: @bold($recipient) at $time $date\nFrom: @bold{$1 <$sender>}\n\n$2";
-  if (*owl_global_get_zsender(&g))
-      notice.z_sender=owl_global_get_zsender(&g);
-  else
-      notice.z_sender=NULL;
   if (opcode) notice.z_opcode=opcode;
 
   notice.z_message_len=strlen(zsig)+1+strlen(message);
-- 
1.6.0.4

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