Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zwrite.c

    r919cbf2 ref4074b  
    182182  }
    183183
     184  /* if there are no recipients we won't send a ping, which
     185     is what we want */
    184186  for (i = 0; i < z->recips->len; i++) {
    185187    to = owl_zwrite_get_recip_n_with_realm(z, i);
    186     if (owl_zwrite_recip_is_personal(to))
    187       send_ping(to, z->class, z->inst);
     188    send_ping(to, z->class, z->inst);
    188189    g_free(to);
    189190  }
     
    206207  g_free(z->message);
    207208
    208   if (z->cc && owl_zwrite_is_personal(z)) {
     209  if (z->recips->len > 0 && z->cc) {
    209210    message = g_string_new("CC: ");
    210211    for (i = 0; i < z->recips->len; i++) {
     
    337338}
    338339
    339 bool owl_zwrite_recip_is_personal(const char *recipient)
    340 {
    341   return recipient[0] && recipient[0] != '@';
    342 }
    343 
    344 bool owl_zwrite_is_personal(const owl_zwrite *z)
     340int owl_zwrite_is_personal(const owl_zwrite *z)
    345341{
    346342  /* return true if at least one of the recipients is personal */
    347343  int i;
    348 
    349   for (i = 0; i < z->recips->len; i++)
    350     if (owl_zwrite_recip_is_personal(z->recips->pdata[i]))
    351       return true;
    352   return false;
     344  char *recip;
     345
     346  for (i = 0; i < z->recips->len; i++) {
     347    recip = z->recips->pdata[i];
     348    if (recip[0] != '@') return 1;
     349  }
     350  return(0);
    353351}
    354352
Note: See TracChangeset for help on using the changeset viewer.