[769] in BarnOwl Developers

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

[D-O-H] r774 - trunk/owl

daemon@ATHENA.MIT.EDU (chmrr@MIT.EDU)
Thu Oct 29 18:09:31 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: chmrr@MIT.EDU
Reply-To: dirty-owl-hackers@MIT.EDU
Date: Sun, 23 Dec 2007 15:16:26 -0500

Author: chmrr
Date: 2007-12-23 15:16:26 -0500 (Sun, 23 Dec 2007)
New Revision: 774

Modified:
   trunk/owl/
   trunk/owl/functions.c
Log:
 r1805@utwig:  chmrr | 2007-12-23 15:15:33 -0500
  * Allow C-r on outgoing messages (useful for CCs)



Property changes on: trunk/owl
___________________________________________________________________
Name: svk:merge
   - 06e3988a-d725-0410-af47-c5dd11e74598:/local/barnowl:1614
8baf6839-b125-0410-9df9-922793c80423:/local/barnowl:20981
8baf6839-b125-0410-9df9-922793c80423:/local/owl:15641
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/branches/par:19594
fe09232e-8620-0410-8e36-e6b4839e121d:/branches/par:688
   + 06e3988a-d725-0410-af47-c5dd11e74598:/local/barnowl:1805
8baf6839-b125-0410-9df9-922793c80423:/local/barnowl:20981
8baf6839-b125-0410-9df9-922793c80423:/local/owl:15641
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/branches/par:19594
fe09232e-8620-0410-8e36-e6b4839e121d:/branches/par:688

Modified: trunk/owl/functions.c
===================================================================
--- trunk/owl/functions.c	2007-12-23 16:32:02 UTC (rev 773)
+++ trunk/owl/functions.c	2007-12-23 20:16:26 UTC (rev 774)
@@ -2059,80 +2059,79 @@
     if (owl_message_is_type_zephyr(m)) {
       /* if it's a zephyr we sent, send it out the same way again */
       if (owl_message_is_direction_out(m)) {
-	owl_function_zwrite_setup(owl_message_get_zwriteline(m));
-	owl_global_set_buffercommand(&g, owl_message_get_zwriteline(m));
-	return;
-      }
-
-      /* Special case a personal reply to a webzephyr user on a class */
-      if ((type==1) && !strcasecmp(owl_message_get_opcode(m), OWL_WEBZEPHYR_OPCODE)) {
-	class=OWL_WEBZEPHYR_CLASS;
-	inst=owl_message_get_sender(m);
-	to=OWL_WEBZEPHYR_PRINCIPAL;
-      } else if (!strcasecmp(owl_message_get_class(m), OWL_WEBZEPHYR_CLASS) && owl_message_is_loginout(m)) {
-	/* Special case LOGIN/LOGOUT notifications on class "webzephyr" */
-	class=OWL_WEBZEPHYR_CLASS;
-	inst=owl_message_get_instance(m);
-	to=OWL_WEBZEPHYR_PRINCIPAL;
-      } else if (owl_message_is_loginout(m)) {
-	/* Normal LOGIN/LOGOUT messages */
-	class="MESSAGE";
-	inst="PERSONAL";
-	to=owl_message_get_sender(m);
-      } else if (type==1) {
-	/* Personal reply */
-	class="MESSAGE";
-	inst="PERSONAL";
-	to=owl_message_get_sender(m);
+          buff = owl_strdup(owl_message_get_zwriteline(m));
       } else {
-	/* General reply */
-	class=owl_message_get_class(m);
-	inst=owl_message_get_instance(m);
-	to=owl_message_get_recipient(m);
-	cc=owl_message_get_cc_without_recipient(m);
-	if (!strcmp(to, "") || !strcmp(to, "*")) {
-	  to="";
-	} else if (to[0]=='@') {
-	  /* leave it, to get the realm */
-	} else {
-	  to=owl_message_get_sender(m);
-	}
+
+        /* Special case a personal reply to a webzephyr user on a class */
+        if ((type==1) && !strcasecmp(owl_message_get_opcode(m), OWL_WEBZEPHYR_OPCODE)) {
+          class=OWL_WEBZEPHYR_CLASS;
+          inst=owl_message_get_sender(m);
+          to=OWL_WEBZEPHYR_PRINCIPAL;
+        } else if (!strcasecmp(owl_message_get_class(m), OWL_WEBZEPHYR_CLASS) && owl_message_is_loginout(m)) {
+          /* Special case LOGIN/LOGOUT notifications on class "webzephyr" */
+          class=OWL_WEBZEPHYR_CLASS;
+          inst=owl_message_get_instance(m);
+          to=OWL_WEBZEPHYR_PRINCIPAL;
+        } else if (owl_message_is_loginout(m)) {
+          /* Normal LOGIN/LOGOUT messages */
+          class="MESSAGE";
+          inst="PERSONAL";
+          to=owl_message_get_sender(m);
+        } else if (type==1) {
+          /* Personal reply */
+          class="MESSAGE";
+          inst="PERSONAL";
+          to=owl_message_get_sender(m);
+        } else {
+          /* General reply */
+          class=owl_message_get_class(m);
+          inst=owl_message_get_instance(m);
+          to=owl_message_get_recipient(m);
+          cc=owl_message_get_cc_without_recipient(m);
+          if (!strcmp(to, "") || !strcmp(to, "*")) {
+            to="";
+          } else if (to[0]=='@') {
+            /* leave it, to get the realm */
+          } else {
+            to=owl_message_get_sender(m);
+          }
+        }
+
+        /* create the command line */
+        if (!strcasecmp(owl_message_get_opcode(m), "CRYPT")) {
+          buff=owl_strdup("zcrypt");
+        } else {
+          buff = owl_strdup("zwrite");
+        }
+        if (strcasecmp(class, "message")) {
+          buff = owl_sprintf("%s -c %s%s%s", oldbuff=buff, owl_getquoting(class), class, owl_getquoting(class));
+          owl_free(oldbuff);
+        }
+        if (strcasecmp(inst, "personal")) {
+          buff = owl_sprintf("%s -i %s%s%s", oldbuff=buff, owl_getquoting(inst), inst, owl_getquoting(inst));
+          owl_free(oldbuff);
+        }
+        if (*to != '\0') {
+          char *tmp, *oldtmp, *tmp2;
+          tmp=short_zuser(to);
+          if (cc) {
+            tmp = owl_util_uniq(oldtmp=tmp, cc, "-");
+            owl_free(oldtmp);
+            buff = owl_sprintf("%s -C %s", oldbuff=buff, tmp);
+            owl_free(oldbuff);
+          } else {
+            if (owl_global_is_smartstrip(&g)) {
+              tmp2=tmp;
+              tmp=owl_zephyr_smartstripped_user(tmp2);
+              owl_free(tmp2);
+            }
+            buff = owl_sprintf("%s %s", oldbuff=buff, tmp);
+            owl_free(oldbuff);
+          }
+          owl_free(tmp);
+        }
+        if (cc) owl_free(cc);
       }
-	
-      /* create the command line */
-      if (!strcasecmp(owl_message_get_opcode(m), "CRYPT")) {
-	buff=owl_strdup("zcrypt");
-      } else {
-	buff = owl_strdup("zwrite");
-      }
-      if (strcasecmp(class, "message")) {
-	buff = owl_sprintf("%s -c %s%s%s", oldbuff=buff, owl_getquoting(class), class, owl_getquoting(class));
-	owl_free(oldbuff);
-      }
-      if (strcasecmp(inst, "personal")) {
-	buff = owl_sprintf("%s -i %s%s%s", oldbuff=buff, owl_getquoting(inst), inst, owl_getquoting(inst));
-	owl_free(oldbuff);
-      }
-      if (*to != '\0') {
-	char *tmp, *oldtmp, *tmp2;
-	tmp=short_zuser(to);
-	if (cc) {
-	  tmp = owl_util_uniq(oldtmp=tmp, cc, "-");
-	  owl_free(oldtmp);
-	  buff = owl_sprintf("%s -C %s", oldbuff=buff, tmp);
-	  owl_free(oldbuff);
-	} else {
-	  if (owl_global_is_smartstrip(&g)) {
-	    tmp2=tmp;
-	    tmp=owl_zephyr_smartstripped_user(tmp2);
-	    owl_free(tmp2);
-	  }
-	  buff = owl_sprintf("%s %s", oldbuff=buff, tmp);
-	  owl_free(oldbuff);
-	}
-	owl_free(tmp);
-      }
-      if (cc) owl_free(cc);
     } else if (owl_message_is_type_aim(m)) {
       /* aim */
       if (owl_message_is_direction_out(m)) {


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