Changeset 44f32fb for zephyr.c


Ignore:
Timestamp:
Jan 10, 2008, 1:16:33 AM (17 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
1151f0b
Parents:
d536e72
Message:
Handle zephyrs to users on non -c message better (fixes #39)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zephyr.c

    r50e29e3 r44f32fb  
    563563    }
    564564  } else if (!strcmp(retnotice->z_message, ZSRVACK_NOTSENT)) {
    565     if (strcasecmp(retnotice->z_class, "message")) {
     565    if (retnotice->z_recipient == NULL
     566        || *retnotice->z_recipient == NULL
     567        || *retnotice->z_recipient == '@') {
    566568      char buff[1024];
    567       owl_function_error("No one subscribed to class class %s", retnotice->z_class);
     569      owl_function_error("No one subscribed to class %s", retnotice->z_class);
    568570      sprintf(buff, "Could not send message to class %s: no one subscribed.\n", retnotice->z_class);
    569571      owl_function_adminmsg("", buff);
     
    571573      char buff[1024];
    572574      tmp = short_zuser(retnotice->z_recipient);
    573       owl_function_error("%s: Not logged in or subscribing to messages.", tmp);
    574       sprintf(buff, "Could not send message to %s: not logged in or subscribing to messages.\n", tmp);
     575      owl_function_error("%s: Not logged in or subscribing.", tmp);
     576      sprintf(buff, "Could not send message to %s: not logged in or subscribing to", tmp);
     577      if(strcmp(retnotice->z_class, "message")) {
     578        sprintf(buff, "%s class %s, instance %s.\n", buff,
     579                retnotice->z_class,
     580                retnotice->z_class_inst);
     581      } else {
     582        sprintf(buff, "%s messages.\n", buff);
     583      }
    575584      owl_function_adminmsg("", buff);
    576585      owl_log_outgoing_zephyr_error(tmp, buff);
Note: See TracChangeset for help on using the changeset viewer.