Changeset d73e3af for zephyr.c


Ignore:
Timestamp:
May 16, 2009, 3:37:35 AM (15 years ago)
Author:
Alex Dehnert <alex@kronborg.(none)>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
7bf51d5
Parents:
315babf
git-author:
Alexander W Dehnert <adehnert@mit.edu> (05/16/09 01:56:52)
git-committer:
Alex Dehnert <alex@kronborg.(none)> (05/16/09 03:37:35)
Message:
Improve handling of outgoing instanced personals

Make Barnowl's Zephyr support handle personals
with a class and/or instance better, by
displaying suitable "Message sent to <foo> on
-c <bar> -i <baz>" messages.

Current behavior:
zwrite -i test adehnert
Message sent to -c message -i test

which suggests that the message wasn't a
personal message.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zephyr.c

    r79d7d98 rd73e3af  
    709709    if (!strcasecmp(retnotice->z_opcode, "ping")) {
    710710      return;
    711     } else if (!strcasecmp(retnotice->z_class, "message") &&
    712                !strcasecmp(retnotice->z_class_inst, "personal")) {
    713       tmp=short_zuser(retnotice->z_recipient);
    714       owl_function_makemsg("Message sent to %s.", tmp);
    715       free(tmp);
    716711    } else {
    717       owl_function_makemsg("Message sent to -c %s -i %s\n", retnotice->z_class, retnotice->z_class_inst);
     712      if (strcasecmp(retnotice->z_recipient, ""))
     713      { // personal
     714        tmp=short_zuser(retnotice->z_recipient);
     715        if(!strcasecmp(retnotice->z_class, "message") &&
     716           !strcasecmp(retnotice->z_class_inst, "personal")) {
     717          owl_function_makemsg("Message sent to %s.", tmp);
     718        } else if(!strcasecmp(retnotice->z_class, "message")) { // instanced, but not classed, personal
     719          owl_function_makemsg("Message sent to %s on -i %s\n", tmp, retnotice->z_class_inst);
     720        } else { // classed personal
     721          owl_function_makemsg("Message sent to %s on -c %s -i %s\n", tmp, retnotice->z_class, retnotice->z_class_inst);
     722        }
     723        free(tmp);
     724      } else {
     725        // class / instance message
     726          owl_function_makemsg("Message sent to -c %s -i %s\n", retnotice->z_class, retnotice->z_class_inst);
     727      }
    718728    }
    719729  } else if (!strcmp(retnotice->z_message, ZSRVACK_NOTSENT)) {
Note: See TracChangeset for help on using the changeset viewer.