Changeset 9854278
- Timestamp:
- Dec 23, 2003, 3:22:21 AM (21 years ago)
- 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
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r952bb256 r9854278 5 5 dangerous, should switch to an admin msg for results, or add a 6 6 new event queue 7 7 First pass at AIM away messages. It is a little different from 8 what most clients seem to do, in that an away reply is sent for 9 each message received. Most clients only reply to the first one 10 per away-session. Also, it's completely tied to the zaway 11 functions, it should probably be separated out into aaway 12 functions with a new "away" function that will get everything. 13 Loop detection stuff should work and has been tested, but I'm 14 not completely sure I did this right ... so odd behavior should 15 be reported. 16 8 17 2.1.1-pre-1 9 18 Only print forced AIM logout message once. -
aim.c
r952bb256 r9854278 254 254 ret=aim_im_sendch1(owl_global_get_aimsess(&g), to, NULL, msg); 255 255 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 260 int 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); 257 265 258 266 /* I don't know how to check for an error yet */ … … 295 303 int owl_aim_set_awaymsg(char *msg) 296 304 { 305 int len; 306 char *foo; 297 307 /* 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); 298 320 299 321 /* … … 332 354 od->create_rooms = g_slist_append(od->create_rooms, cr); 333 355 */ 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); 335 359 aim_reqservice(owl_global_get_aimsess(&g), NULL, AIM_CONN_TYPE_CHATNAV); 336 360 aim_chatnav_createroom(owl_global_get_aimsess(&g), cur, name, exchange); … … 1443 1467 OWL_MESSAGE_DIRECTION_IN, 1444 1468 0); 1469 if (args->icbmflags & AIM_IMFLAGS_AWAY) owl_message_set_attribute(m, "isauto", ""); 1445 1470 owl_global_messagequeue_addmsg(&g, m); 1446 1471 owl_free(stripmsg); -
functions.c
r952bb256 r9854278 443 443 if (!ret) { 444 444 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 462 void 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."); */ 445 475 } else { 446 476 owl_function_error("Could not send AIM message."); … … 834 864 owl_global_set_zaway_on(&g); 835 865 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)); 837 867 } 838 868 … … 840 870 { 841 871 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"); 843 874 } 844 875 -
message.c
r2de4f20 r9854278 771 771 772 772 773 /* isthe "isprivate" attribute if it's a private zephyr */773 /* set the "isprivate" attribute if it's a private zephyr */ 774 774 if (!strcasecmp(n->z_recipient, owl_zephyr_get_sender())) { 775 775 owl_message_set_isprivate(m); 776 } 777 778 /* set the "isauto" attribute if it's an autoreply */ 779 if (!strcasecmp(n->z_message, "Automated reply:") || 780 !strcasecmp(n->z_opcode, "auto")) { 781 owl_message_set_attribute(m, "isauto", ""); 776 782 } 777 783 -
owl.c
r5a95b69 r9854278 472 472 473 473 /* do we need to autoreply? */ 474 if (owl_global_is_zaway(&g) ) {474 if (owl_global_is_zaway(&g) && !owl_message_get_attribute_value(m, "isauto")) { 475 475 if (owl_message_is_type_zephyr(m)) { 476 476 owl_zephyr_zaway(m); 477 477 } else if (owl_message_is_type_aim(m)) { 478 /* can't do this, there's no mechanism not to start a loop */ 479 /* owl_aim_send_im(owl_message_get_sender(m), owl_global_get_zaway_msg(&g)); */ 478 owl_function_send_aimawymsg(owl_message_get_sender(m), owl_global_get_zaway_msg(&g)); 480 479 } 481 480 } -
zephyr.c
r2de4f20 r9854278 484 484 if (!strcasecmp(owl_message_get_zsig(m), "Automated reply:")) return; 485 485 if (!strcasecmp(owl_message_get_sender(m), ZGetSender())) return; 486 if (owl_message_get_attribute_value(m, "isauto")) return; 486 487 487 488 if (owl_global_is_smartstrip(&g)) {
Note: See TracChangeset
for help on using the changeset viewer.