Changeset 9854278 for aim.c


Ignore:
Timestamp:
Dec 23, 2003, 3:22:21 AM (20 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, 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
  • aim.c

    r952bb256 r9854278  
    254254  ret=aim_im_sendch1(owl_global_get_aimsess(&g), to, NULL, msg);
    255255   
    256   /* aim_send_im(owl_global_get_aimsess(&g), to, AIM_IMFLAGS_ACK, msg); */
     256  /* I don't know how to check for an error yet */
     257  return(ret);
     258}
     259
     260int owl_aim_send_awaymsg(char *to, char *msg)
     261{
     262  int ret;
     263
     264  ret=aim_im_sendch1(owl_global_get_aimsess(&g), to, AIM_IMFLAGS_AWAY, msg);
    257265
    258266  /* I don't know how to check for an error yet */
     
    295303int owl_aim_set_awaymsg(char *msg)
    296304{
     305  int len;
     306  char *foo;
    297307  /* there is a max away message lentgh we should check against */
     308
     309  foo=owl_strdup(msg);
     310  len=strlen(foo);
     311  if (len>500) {
     312    foo[500]='\0';
     313    len=499;
     314  }
     315   
     316  aim_locate_setprofile(owl_global_get_aimsess(&g),
     317                        NULL, NULL, 0,
     318                        "us-ascii", foo, len);
     319  owl_free(foo);
    298320
    299321  /*
     
    332354    od->create_rooms = g_slist_append(od->create_rooms, cr);
    333355    */
    334     /* aim_reqservice(owl_global_get_aimsess(&g), owl_global_get_bosconn(&g), AIM_CONN_TYPE_CHATNAV); */
     356    aim_reqservice(owl_global_get_aimsess(&g),
     357                   aim_getconn_type(owl_global_get_aimsess(&g), AIM_CONN_TYPE_CHATNAV),
     358                   AIM_CONN_TYPE_CHATNAV);
    335359    aim_reqservice(owl_global_get_aimsess(&g), NULL, AIM_CONN_TYPE_CHATNAV);
    336360    aim_chatnav_createroom(owl_global_get_aimsess(&g), cur, name, exchange);
     
    14431467                         OWL_MESSAGE_DIRECTION_IN,
    14441468                         0);
     1469  if (args->icbmflags & AIM_IMFLAGS_AWAY) owl_message_set_attribute(m, "isauto", "");
    14451470  owl_global_messagequeue_addmsg(&g, m);
    14461471  owl_free(stripmsg);
Note: See TracChangeset for help on using the changeset viewer.