Changeset aa2f6364 for zephyr.c


Ignore:
Timestamp:
Oct 12, 2002, 11:46:25 AM (18 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
8fec514
Parents:
b12c219
Message:
Prettyed up the zwrite line for using 'reply' on a zaway
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zephyr.c

    r2527615 raa2f6364  
    331331 
    332332void owl_zephyr_zaway(owl_message *m) {
    333   char *tmpbuff;
    334  
    335   /* bail if it doesn't look like a message we should reply to */
     333  char *tmpbuff, *myuser;
     334 
     335  /* bail if it doesn't look like a message we should reply to.  Some
     336     of this defined by the way zaway(1) works */
    336337  if (strcasecmp(owl_message_get_class(m), "message")) return;
    337338  if (strcasecmp(owl_message_get_recipient(m), ZGetSender())) return;
     
    349350              owl_global_get_zaway_msg(&g));
    350351
     352  myuser=short_zuser(owl_message_get_sender(m));
     353  if (!strcasecmp(owl_message_get_instance(m), "personal")) {
     354    tmpbuff = owl_sprintf("zwrite %s", myuser);
     355  } else {
     356    tmpbuff = owl_sprintf("zwrite -i %s %s", owl_message_get_instance(m), myuser);
     357  }
     358  owl_free(myuser);
     359
    351360  /* display the message as an admin message in the receive window */
    352   tmpbuff = owl_sprintf("zwrite -c %s -i %s %s",
    353                         owl_message_get_class(m),
    354                         owl_message_get_instance(m),
    355                         owl_message_get_sender(m));
    356361  owl_function_make_outgoing_zephyr(owl_global_get_zaway_msg(&g), tmpbuff, "Automated reply:");
    357362  owl_free(tmpbuff);
Note: See TracChangeset for help on using the changeset viewer.