Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zephyr.c

    rd953ede rf183917  
    697697  Code_t ret;
    698698  ZNotice_t notice;
     699  char *zsender = NULL;
    699700   
    700701  memset(&notice, 0, sizeof(notice));
     
    708709  notice.z_class=zstr(class);
    709710  notice.z_class_inst=zstr(instance);
    710   notice.z_sender=NULL;
    711   if (!strcmp(recipient, "*") || !strcmp(recipient, "@")) {
     711  if (!strcmp(recipient, "@")) {
    712712    notice.z_recipient=zstr("");
    713     if (*owl_global_get_zsender(&g))
    714         notice.z_sender=zstr(owl_global_get_zsender(&g));
    715713  } else {
    716714    notice.z_recipient=zstr(recipient);
    717715  }
     716  if (!owl_zwrite_recip_is_personal(recipient) && *owl_global_get_zsender(&g))
     717    notice.z_sender = zsender = long_zuser(owl_global_get_zsender(&g));
    718718  notice.z_default_format=zstr("Class $class, Instance $instance:\nTo: @bold($recipient) at $time $date\nFrom: @bold{$1 <$sender>}\n\n$2");
    719719  if (opcode) notice.z_opcode=zstr(opcode);
     
    730730  g_free(notice.z_message);
    731731  ZFreeNotice(&notice);
     732  g_free(zsender);
    732733  if (ret != ZERR_NONE) {
    733734    owl_function_error("Error sending zephyr: %s", error_message(ret));
     
    789790  } else if (!strcmp(retnotice->z_message, ZSRVACK_NOTSENT)) {
    790791    if (retnotice->z_recipient == NULL
    791         || *retnotice->z_recipient == 0
    792         || *retnotice->z_recipient == '@') {
     792        || !owl_zwrite_recip_is_personal(retnotice->z_recipient)) {
    793793      char *buff;
    794794      owl_function_error("No one subscribed to class %s", retnotice->z_class);
Note: See TracChangeset for help on using the changeset viewer.