gaim/gaim

sf patch #1112296, from Magnus Hult
oldstatus
2005-02-01, Mark Doliner
411d284f7141
Parents b6b253ece9be
Children 447c7f966ba0
sf patch #1112296, from Magnus Hult
Send ICQ offline messages as the user-specified character encoding
instead of UCS-2BE.
--- a/ChangeLog Tue Feb 01 11:12:30 2005 -0500
+++ b/ChangeLog Tue Feb 01 19:07:45 2005 -0500
@@ -2,6 +2,8 @@
version 1.1.3:
* CHAP authentication support for SOCKS5 proxies (Malcolm Smith)
+ * ICQ offline messages are sent using your specified character
+ set instead of Unicode (Magnus Hult)
version 1.1.2 (1/20/2005):
* MSN 'HTTP Method' fixed (Felipe Contreras)
--- a/src/protocols/oscar/oscar.c Tue Feb 01 11:12:30 2005 -0500
+++ b/src/protocols/oscar/oscar.c Tue Feb 01 19:07:45 2005 -0500
@@ -510,18 +510,27 @@
}
/*
- * If we're sending to an ICQ user, and they are advertising the
- * Unicode capability, then attempt to send as UCS-2BE.
+ * If we're sending to an ICQ user, and they are in our
+ * buddy list, and they are advertising the Unicode
+ * capability, and they are online, then attempt to send
+ * as UCS-2BE.
*/
if ((destsn != NULL) && isdigit(destsn[0]))
userinfo = aim_locate_finduserinfo(od->sess, destsn);
- if ((userinfo != NULL) && (userinfo->capabilities & AIM_CAPS_ICQUTF8)) {
- *msg = g_convert(from, strlen(from), "UCS-2BE", "UTF-8", NULL, msglen, NULL);
- if (*msg != NULL) {
- *charset = AIM_CHARSET_UNICODE;
- *charsubset = 0x0000;
- return;
+ if ((userinfo != NULL) && (userinfo->capabilities & AIM_CAPS_ICQUTF8))
+ {
+ GaimBuddy *b;
+ b = gaim_find_buddy(account, destsn);
+ if ((b != NULL) && (GAIM_BUDDY_IS_ONLINE(b)))
+ {
+ *msg = g_convert(from, strlen(from), "UCS-2BE", "UTF-8", NULL, msglen, NULL);
+ if (*msg != NULL)
+ {
+ *charset = AIM_CHARSET_UNICODE;
+ *charsubset = 0x0000;
+ return;
+ }
}
}