Changeset a5b5d00 for zwrite.c


Ignore:
Timestamp:
Mar 24, 2011, 4:42:22 PM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
3f52e14
Parents:
e5da3fe
git-author:
David Benjamin <davidben@mit.edu> (03/11/11 18:12:10)
git-committer:
David Benjamin <davidben@mit.edu> (03/24/11 16:42:22)
Message:
In duplicated outgoing zephyrs only reply on the relevant recipient

Fixes the other half of bug #63.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zwrite.c

    re56303f ra5b5d00  
    382382 * message field is stripped out. Result should be freed with
    383383 * g_free.
     384 *
     385 * If not a CC, only the recip_index'th user will be replied to.
    384386 */
    385 char *owl_zwrite_get_replyline(const owl_zwrite *z)
     387char *owl_zwrite_get_replyline(const owl_zwrite *z, int recip_index)
    386388{
    387389  /* Match ordering in zwrite help. */
     
    415417    owl_string_append_quoted_arg(buf, z->opcode);
    416418  }
    417   for (i = 0; i < owl_list_get_size(&(z->recips)); i++) {
     419  if (z->cc) {
     420    for (i = 0; i < owl_list_get_size(&(z->recips)); i++) {
     421      g_string_append_c(buf, ' ');
     422      owl_string_append_quoted_arg(buf, owl_list_get_element(&(z->recips), i));
     423    }
     424  } else if (recip_index < owl_list_get_size(&(z->recips))) {
    418425    g_string_append_c(buf, ' ');
    419     owl_string_append_quoted_arg(buf, owl_list_get_element(&(z->recips), i));
     426    owl_string_append_quoted_arg(buf, owl_list_get_element(&(z->recips), recip_index));
    420427  }
    421428
Note: See TracChangeset for help on using the changeset viewer.