Mercurial > pidgin.yaz
diff src/protocols/oscar/oscar.c @ 4838:60d8c5ad77f9
[gaim-migrate @ 5163]
Aside from my usually bit o' cleanup, this commit changes the function
used to send away messages auto-responses.
The auto-response is now sent with the same function as normal messages,
instead of calling a simpler abstracted function in libfaim which then
called the normal function.
This has 2 positive effects:
1) Auto-responses will have the correct encoding set
2) Auto-responses will contain the "I have an icon" flag. If the other
user sends you 1 more message after they get your away message, they
are able to get your buddy icon.
Something about dreams as fragile as bubbles
Well perhaps it won't apply
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 20 Mar 2003 06:14:21 +0000 |
parents | 0ed37c803503 |
children | 7bdda84b5431 |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Thu Mar 20 05:24:41 2003 +0000 +++ b/src/protocols/oscar/oscar.c Thu Mar 20 06:14:21 2003 +0000 @@ -4083,23 +4083,14 @@ int ret = 0; GError *err = NULL; - if (dim) { - if (dim->connected) { /* If we're not connected yet, send through server */ - /* XXX - The last parameter below is the encoding. Let Paco-Paco do something with it. */ - ret = aim_odc_send_im(od->sess, dim->conn, message, len == -1 ? strlen(message) : len, 0); - if (ret == 0) - return 1; - else return ret; - } - debug_printf("Direct IM pending, but not connected; sending through server\n"); + if (dim && dim->connected) { + /* If we're directly connected, send a direct IM */ + /* XXX - The last parameter below is the encoding. Let Paco-Paco do something with it. */ + ret = aim_odc_send_im(od->sess, dim->conn, message, len == -1 ? strlen(message) : len, 0); } else if (len != -1) { /* Trying to send an IM image outside of a direct connection. */ oscar_ask_direct_im(gc, name); - return -ENOTCONN; - } - - if (imflags & IM_FLAG_AWAY) { - ret = aim_im_sendch1(od->sess, name, AIM_IMFLAGS_AWAY, message); + ret = -ENOTCONN; } else { struct buddyinfo *bi; struct aim_sendimext_args args; @@ -4122,6 +4113,9 @@ args.featureslen = sizeof(features_aim); } + if (imflags & IM_FLAG_AWAY) + args.flags |= AIM_IMFLAGS_AWAY; + if (bi->ico_need) { debug_printf("Sending buddy icon request with message\n"); args.flags |= AIM_IMFLAGS_BUDDYREQ; @@ -4150,7 +4144,6 @@ bi->ico_informed = TRUE; } - fclose(file); g_free(buf); } @@ -4198,6 +4191,7 @@ ret = aim_im_sendch1_ext(od->sess, &args); } + if (ret >= 0) return 1; return ret;