Mercurial > pidgin.yaz
comparison src/protocols/oscar/oscar.c @ 11172:1f0844561c7e
[gaim-migrate @ 13274]
Change assumed capabilities for offline ICQ users to fix encoding
troubles. Thanks to Ilya Konstantinov, SF Bug #1179452.
committer: Tailor Script <tailor@pidgin.im>
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Sat, 30 Jul 2005 01:29:26 +0000 |
parents | ccb38cf22483 |
children | 1ce573a2e125 |
comparison
equal
deleted
inserted
replaced
11171:ebb02ea3c789 | 11172:1f0844561c7e |
---|---|
74 static int caps_aim = AIM_CAPS_CHAT | AIM_CAPS_BUDDYICON | AIM_CAPS_DIRECTIM | AIM_CAPS_SENDFILE | AIM_CAPS_INTEROPERATE | AIM_CAPS_ICHAT; | 74 static int caps_aim = AIM_CAPS_CHAT | AIM_CAPS_BUDDYICON | AIM_CAPS_DIRECTIM | AIM_CAPS_SENDFILE | AIM_CAPS_INTEROPERATE | AIM_CAPS_ICHAT; |
75 static int caps_icq = AIM_CAPS_BUDDYICON | AIM_CAPS_DIRECTIM | AIM_CAPS_SENDFILE | AIM_CAPS_ICQUTF8 | AIM_CAPS_INTEROPERATE | AIM_CAPS_ICHAT; | 75 static int caps_icq = AIM_CAPS_BUDDYICON | AIM_CAPS_DIRECTIM | AIM_CAPS_SENDFILE | AIM_CAPS_ICQUTF8 | AIM_CAPS_INTEROPERATE | AIM_CAPS_ICHAT; |
76 | 76 |
77 static fu8_t features_aim[] = {0x01, 0x01, 0x01, 0x02}; | 77 static fu8_t features_aim[] = {0x01, 0x01, 0x01, 0x02}; |
78 static fu8_t features_icq[] = {0x01, 0x06}; | 78 static fu8_t features_icq[] = {0x01, 0x06}; |
79 static fu8_t features_icq_offline[] = {0x01}; | |
79 static fu8_t ck[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; | 80 static fu8_t ck[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; |
80 | 81 |
81 typedef struct _OscarData OscarData; | 82 typedef struct _OscarData OscarData; |
82 struct _OscarData { | 83 struct _OscarData { |
83 aim_session_t *sess; | 84 aim_session_t *sess; |
5622 g_hash_table_insert(od->buddyinfo, g_strdup(gaim_normalize(account, name)), bi); | 5623 g_hash_table_insert(od->buddyinfo, g_strdup(gaim_normalize(account, name)), bi); |
5623 } | 5624 } |
5624 | 5625 |
5625 args.flags = AIM_IMFLAGS_ACK | AIM_IMFLAGS_CUSTOMFEATURES; | 5626 args.flags = AIM_IMFLAGS_ACK | AIM_IMFLAGS_CUSTOMFEATURES; |
5626 if (od->icq) { | 5627 if (od->icq) { |
5627 args.features = features_icq; | 5628 /* We have to present different "features" (whose meaning |
5628 args.featureslen = sizeof(features_icq); | 5629 is unclear and are merely a result of protocol inspection) |
5630 to offline ICQ buddies. Otherwise, the official | |
5631 ICQ client doesn't treat those messages as being "ANSI- | |
5632 encoded" (and instead, assumes them to be UTF-8). | |
5633 For more details, see SF issue 1179452. | |
5634 */ | |
5635 GaimBuddy *buddy = gaim_find_buddy(gc->account, name); | |
5636 if (buddy && buddy->present != 0) { | |
5637 args.features = features_icq; | |
5638 args.featureslen = sizeof(features_icq); | |
5639 } else { | |
5640 args.features = features_icq_offline; | |
5641 args.featureslen = sizeof(features_icq_offline); | |
5642 } | |
5629 args.flags |= AIM_IMFLAGS_OFFLINE; | 5643 args.flags |= AIM_IMFLAGS_OFFLINE; |
5630 } else { | 5644 } else { |
5631 args.features = features_aim; | 5645 args.features = features_aim; |
5632 args.featureslen = sizeof(features_aim); | 5646 args.featureslen = sizeof(features_aim); |
5633 | 5647 |