Changeset a827529 for zephyr.c


Ignore:
Timestamp:
Jan 11, 2008, 2:28:36 PM (16 years ago)
Author:
Alejandro R. Sedeño <asedeno@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:
fac5463
Parents:
16c6cca (diff), 9e02bb7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:
Merged revisions 812-830 via svnmerge from 
file:///afs/sipb.mit.edu/project/barnowl/src/svn/trunk

........
  r814 | nelhage | 2008-01-09 23:14:20 -0500 (Wed, 09 Jan 2008) | 3 lines
  
   r27181@lunatique:  nelhage | 2008-01-09 23:13:52 -0500
   Implement /part and /names. We don't parse the /names response yet
........
  r815 | nelhage | 2008-01-10 00:12:52 -0500 (Thu, 10 Jan 2008) | 1 line
  
  Show PART and JOIN messages
........
  r816 | nelhage | 2008-01-10 00:13:11 -0500 (Thu, 10 Jan 2008) | 2 lines
  
  Show the channel in LOG{IN,OUT} messages
........
  r817 | geofft | 2008-01-10 00:32:44 -0500 (Thu, 10 Jan 2008) | 6 lines
  
  A (broken) attempt at handling motds and other IRC admin messages
  
  Export owl_function_beep() to Perl, and ring the bell on receiving a message
  containing your nick (on that network)
........
  r818 | nelhage | 2008-01-10 01:01:32 -0500 (Thu, 10 Jan 2008) | 2 lines
  
  Document the IRC variables
........
  r819 | nelhage | 2008-01-10 01:02:06 -0500 (Thu, 10 Jan 2008) | 3 lines
  
  Handle recreation of an existing variable better. Copy over the
  default and docstrings, but preserve the old value.
........
  r820 | nelhage | 2008-01-10 01:16:33 -0500 (Thu, 10 Jan 2008) | 2 lines
  
  Handle zephyrs to users on non -c message better (fixes #39)
........
  r821 | nelhage | 2008-01-10 01:28:59 -0500 (Thu, 10 Jan 2008) | 2 lines
  
  sprintf -> snprintf
........
  r822 | nelhage | 2008-01-10 01:43:11 -0500 (Thu, 10 Jan 2008) | 2 lines
  
  Make :reload-modules work correctly with PARs
........
  r823 | nelhage | 2008-01-10 15:47:00 -0500 (Thu, 10 Jan 2008) | 1 line
  
  Require 'isprivate' to be a literal 'true', not merely present for a message to be considered private
........
  r824 | nelhage | 2008-01-10 15:48:00 -0500 (Thu, 10 Jan 2008) | 2 lines
  
  Document (nearly) every public function in the BarnOwl:: namespace
........
  r825 | nelhage | 2008-01-10 15:49:27 -0500 (Thu, 10 Jan 2008) | 2 lines
  
  `beep' is already a barnowl command, so this binding is superfluous
........
  r826 | nelhage | 2008-01-10 15:58:49 -0500 (Thu, 10 Jan 2008) | 1 line
  
  strip IRC coloring from IRC messages
........
  r827 | nelhage | 2008-01-10 17:22:46 -0500 (Thu, 10 Jan 2008) | 2 lines
  
  Document ::Hook and ::Hooks
........
  r828 | geofft | 2008-01-10 21:01:27 -0500 (Thu, 10 Jan 2008) | 1 line
  
  Move comment around so that perlglue.xs compiles.
........
  r829 | nelhage | 2008-01-10 23:25:27 -0500 (Thu, 10 Jan 2008) | 1 line
  
  doc nits
........
  r830 | nelhage | 2008-01-11 01:38:50 -0500 (Fri, 11 Jan 2008) | 2 lines
  
  Handle `nickinuse' errors and disconnects
........
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zephyr.c

    r6201646 ra827529  
    601601    }
    602602  } else if (!strcmp(retnotice->z_message, ZSRVACK_NOTSENT)) {
    603     if (strcasecmp(retnotice->z_class, "message")) {
    604       char buff[1024];
    605       owl_function_error("No one subscribed to class class %s", retnotice->z_class);
    606       sprintf(buff, "Could not send message to class %s: no one subscribed.\n", retnotice->z_class);
     603    #define BUFFLEN 1024
     604    if (retnotice->z_recipient == NULL
     605        || *retnotice->z_recipient == NULL
     606        || *retnotice->z_recipient == '@') {
     607      char buff[BUFFLEN];
     608      owl_function_error("No one subscribed to class %s", retnotice->z_class);
     609      snprintf(buff, BUFFLEN, "Could not send message to class %s: no one subscribed.\n", retnotice->z_class);
    607610      owl_function_adminmsg("", buff);
    608611    } else {
    609       char buff[1024];
     612      char buff[BUFFLEN];
    610613      tmp = short_zuser(retnotice->z_recipient);
    611       owl_function_error("%s: Not logged in or subscribing to messages.", tmp);
    612       sprintf(buff, "Could not send message to %s: not logged in or subscribing to messages.\n", tmp);
     614      owl_function_error("%s: Not logged in or subscribing.", tmp);
     615      snprintf(buff, BUFFLEN, "Could not send message to %s: not logged in or subscribing to", tmp);
     616      if(strcmp(retnotice->z_class, "message")) {
     617        snprintf(buff, BUFFLEN,
     618                 "%s class %s, instance %s.\n", buff,
     619                 retnotice->z_class,
     620                 retnotice->z_class_inst);
     621      } else {
     622        snprintf(buff, BUFFLEN,
     623                 "%s messages.\n", buff);
     624      }
    613625      owl_function_adminmsg("", buff);
    614626      owl_log_outgoing_zephyr_error(tmp, buff);
Note: See TracChangeset for help on using the changeset viewer.