Mercurial > pidgin
diff libpurple/protocols/qq/group_info.c @ 23052:ebad75b719f5
Sun Jun 29 22:00:12 CST 2008 csyfek@gmail.com
* 20080629-fixed-qun-processing
Merged patches from moo, ccpaging and coly
Tickets:
References #6199
Sat Jun 28 13:25:40 CST 2008 csyfek@gmail.com
* 20080628-get-friends
Patches from moo and ccpaging.
Tickets:
Fixes #4956.
Fixes #2998.
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Sun, 29 Jun 2008 14:24:21 +0000 |
parents | 9a5d140400f1 |
children | bdb38a8bf721 |
line wrap: on
line diff
--- a/libpurple/protocols/qq/group_info.c Tue Jun 24 12:28:38 2008 +0000 +++ b/libpurple/protocols/qq/group_info.c Sun Jun 29 14:24:21 2008 +0000 @@ -141,6 +141,9 @@ qq_send_group_cmd(gc, group, raw_data, bytes); } +/** + * @brief 处理群信息.当前群信息的处理还不完善,由于版本的不同导致协议的解读有差异. + */ void qq_process_group_cmd_get_group_info(guint8 *data, gint len, PurpleConnection *gc) { qq_group *group; @@ -163,7 +166,7 @@ g_return_if_fail(internal_group_id > 0); bytes += qq_get32(&(external_group_id), data + bytes); - g_return_if_fail(internal_group_id > 0); + g_return_if_fail(external_group_id > 0); pending_id = qq_get_pending_id(qd->adding_groups_from_server, internal_group_id); if (pending_id != NULL) { @@ -183,13 +186,24 @@ bytes += qq_get32(&(group->group_category), data + bytes); bytes += qq_get16(&max_members, data + bytes); bytes += qq_get8(&unknown1, data + bytes); - bytes += qq_get32(&(unknown4), data + bytes); /* versionID */ - + /* XXX + * the following, while Eva: + * 4(unk), 4(verID), 1(nameLen), nameLen(qunNameContent), 1(0x00), + * 2(qunNoticeLen), qunNoticeLen(qunNoticeContent, 1(qunDescLen), + * qunDestLen(qunDestcontent)) */ + bytes += qq_get8(&unknown1, data + bytes); + purple_debug(PURPLE_DEBUG_INFO, "QQ", "type=%u creatorid=%u category=%u\n", + group->group_type, group->creator_uid, group->group_category); + purple_debug(PURPLE_DEBUG_INFO, "QQ", "maxmembers=%u", max_members); + /* strlen + <str content> */ bytes += convert_as_pascal_string(data + bytes, &(group->group_name_utf8), QQ_CHARSET_DEFAULT); + purple_debug(PURPLE_DEBUG_INFO, "QQ", "group \"%s\"\n", group->group_name_utf8); bytes += qq_get16(&unknown, data + bytes); /* 0x0000 */ bytes += convert_as_pascal_string(data + bytes, &(group->notice_utf8), QQ_CHARSET_DEFAULT); + purple_debug(PURPLE_DEBUG_INFO, "QQ", "notice \"%s\"\n", group->notice_utf8); bytes += convert_as_pascal_string(data + bytes, &(group->group_desc_utf8), QQ_CHARSET_DEFAULT); + purple_debug(PURPLE_DEBUG_INFO, "QQ", "group_desc \"%s\"\n", group->group_desc_utf8); num = 0; /* now comes the member list separated by 0x00 */