Changeset 9854278 for functions.c


Ignore:
Timestamp:
Dec 23, 2003, 3:22:21 AM (17 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
e9f239b
Parents:
952bb256
Message:
First pass at AIM away messages.  It is a little different from
  what most clients seem to do, in that an away reply is sent for
  each message received.  Most clients only reply to the first one
  per away-session.  Also, it's completely tied to the zaway
  functions, it should probably be separated out into aaway
  functions with a new "away" function that will get everything.
  Loop detection stuff should work and has been tested, but I'm
  not completely sure I did this right ... so odd behavior should
  be reported.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r952bb256 r9854278  
    443443  if (!ret) {
    444444    owl_function_makemsg("AIM message sent.");
     445  } else {
     446    owl_function_error("Could not send AIM message.");
     447  }
     448
     449  /* display the message as an outgoing message in the receive window */
     450  if (owl_global_is_displayoutgoing(&g)) {
     451    owl_function_make_outgoing_aim(msg, to);
     452  }
     453
     454  /* log it if we have logging turned on */
     455  if (owl_global_is_logging(&g)) {
     456    owl_log_outgoing_aim(to, msg);
     457  }
     458
     459  owl_free(format_msg);
     460}
     461
     462void owl_function_send_aimawymsg(char *to, char *msg)
     463{
     464  int ret;
     465  char *format_msg;
     466
     467  /* make a formatted copy of the message */
     468  format_msg=owl_strdup(msg);
     469  owl_text_wordunwrap(format_msg);
     470 
     471  /* send the message */
     472  ret=owl_aim_send_awaymsg(to, format_msg);
     473  if (!ret) {
     474    /* owl_function_makemsg("AIM message sent."); */
    445475  } else {
    446476    owl_function_error("Could not send AIM message.");
     
    834864  owl_global_set_zaway_on(&g);
    835865  owl_aim_set_awaymsg(owl_global_get_zaway_msg(&g));
    836   owl_function_makemsg("zaway set (%s)", owl_global_get_zaway_msg(&g));
     866  owl_function_makemsg("aim and zaway set (%s)", owl_global_get_zaway_msg(&g));
    837867}
    838868
     
    840870{
    841871  owl_global_set_zaway_off(&g);
    842   owl_function_makemsg("zaway off");
     872  owl_aim_set_awaymsg("");
     873  owl_function_makemsg("aim and zaway off");
    843874}
    844875
Note: See TracChangeset for help on using the changeset viewer.