From: <mar...@us...> - 2007-02-01 09:23:48
|
Revision: 18179 http://svn.sourceforge.net/gaim/?rev=18179&view=rev Author: markhuetsch Date: 2007-02-01 01:23:48 -0800 (Thu, 01 Feb 2007) Log Message: ----------- I believe there's a bug in the get_buddies_levels() code that I don't have time to find. Temporarily disable it. Modified Paths: -------------- trunk/libgaim/protocols/qq/buddy_info.c trunk/libgaim/protocols/qq/buddy_info.h trunk/libgaim/protocols/qq/buddy_list.c Modified: trunk/libgaim/protocols/qq/buddy_info.c =================================================================== --- trunk/libgaim/protocols/qq/buddy_info.c 2007-01-29 22:07:00 UTC (rev 18178) +++ trunk/libgaim/protocols/qq/buddy_info.c 2007-02-01 09:23:48 UTC (rev 18179) @@ -741,6 +741,7 @@ qq_send_cmd(gc, QQ_CMD_GET_LEVEL, TRUE, 0, TRUE, buf, 5); } +/* void qq_send_packet_get_buddies_levels(GaimConnection *gc) { guint8 *buf, *tmp, size; @@ -749,8 +750,10 @@ GList *node = qd->buddies; if (qd->buddies) { +*/ /* server only sends back levels for online buddies, no point * in asking for anyone else */ +/* size = 4*g_list_length(qd->buddies) + 1; buf = g_new0(guint8, size); tmp = buf + 1; @@ -767,8 +770,9 @@ } qq_send_cmd(gc, QQ_CMD_GET_LEVEL, TRUE, 0, TRUE, buf, size); g_free(buf); - } + } } +*/ void qq_process_get_level_reply(guint8 *buf, gint buf_len, GaimConnection *gc) { Modified: trunk/libgaim/protocols/qq/buddy_info.h =================================================================== --- trunk/libgaim/protocols/qq/buddy_info.h 2007-01-29 22:07:00 UTC (rev 18178) +++ trunk/libgaim/protocols/qq/buddy_info.h 2007-02-01 09:23:48 UTC (rev 18179) @@ -93,7 +93,9 @@ void qq_process_get_info_reply(guint8 *buf, gint buf_len, GaimConnection *gc); void qq_info_query_free(qq_data *qd); void qq_send_packet_get_level(GaimConnection *gc, guint32 uid); +/* void qq_send_packet_get_buddies_levels(GaimConnection *gc); +*/ void qq_process_get_level_reply(guint8 *buf, gint buf_len, GaimConnection *gc); #endif Modified: trunk/libgaim/protocols/qq/buddy_list.c =================================================================== --- trunk/libgaim/protocols/qq/buddy_list.c 2007-01-29 22:07:00 UTC (rev 18178) +++ trunk/libgaim/protocols/qq/buddy_list.c 2007-02-01 09:23:48 UTC (rev 18179) @@ -215,8 +215,7 @@ q_bud->flag1 = fe->flag1; q_bud->comm_flag = fe->comm_flag; qq_update_buddy_contact(gc, q_bud); - } - else { + } else { gaim_debug(GAIM_DEBUG_ERROR, "QQ", "Got an online buddy %d, but not in my buddy list\n", fe->s->uid); } @@ -234,9 +233,8 @@ gaim_debug(GAIM_DEBUG_INFO, "QQ", "Has more online buddies, position from %d\n", position); qq_send_packet_get_buddies_online(gc, position); - } - else { - qq_send_packet_get_buddies_levels(gc); + } else { + /* qq_send_packet_get_buddies_levels(gc); */ qq_refresh_all_buddy_status(gc); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-04-04 03:51:32
|
Revision: 18230 http://svn.sourceforge.net/gaim/?rev=18230&view=rev Author: markhuetsch Date: 2007-04-03 20:51:32 -0700 (Tue, 03 Apr 2007) Log Message: ----------- Bug 1671638 fixed bhpan. Modified Paths: -------------- trunk/libgaim/protocols/qq/buddy_info.c trunk/libgaim/protocols/qq/buddy_info.h trunk/libgaim/protocols/qq/buddy_list.c Modified: trunk/libgaim/protocols/qq/buddy_info.c =================================================================== --- trunk/libgaim/protocols/qq/buddy_info.c 2007-04-04 03:50:24 UTC (rev 18229) +++ trunk/libgaim/protocols/qq/buddy_info.c 2007-04-04 03:51:32 UTC (rev 18230) @@ -741,19 +741,17 @@ qq_send_cmd(gc, QQ_CMD_GET_LEVEL, TRUE, 0, TRUE, buf, 5); } -/* void qq_send_packet_get_buddies_levels(GaimConnection *gc) { - guint8 *buf, *tmp, size; + guint8 *buf, *tmp; + guint16 size; qq_buddy *q_bud; qq_data *qd = (qq_data *) gc->proto_data; GList *node = qd->buddies; if (qd->buddies) { -*/ /* server only sends back levels for online buddies, no point * in asking for anyone else */ -/* size = 4*g_list_length(qd->buddies) + 1; buf = g_new0(guint8, size); tmp = buf + 1; @@ -772,7 +770,6 @@ g_free(buf); } } -*/ void qq_process_get_level_reply(guint8 *buf, gint buf_len, GaimConnection *gc) { Modified: trunk/libgaim/protocols/qq/buddy_info.h =================================================================== --- trunk/libgaim/protocols/qq/buddy_info.h 2007-04-04 03:50:24 UTC (rev 18229) +++ trunk/libgaim/protocols/qq/buddy_info.h 2007-04-04 03:51:32 UTC (rev 18230) @@ -93,9 +93,7 @@ void qq_process_get_info_reply(guint8 *buf, gint buf_len, GaimConnection *gc); void qq_info_query_free(qq_data *qd); void qq_send_packet_get_level(GaimConnection *gc, guint32 uid); -/* void qq_send_packet_get_buddies_levels(GaimConnection *gc); -*/ void qq_process_get_level_reply(guint8 *buf, gint buf_len, GaimConnection *gc); #endif Modified: trunk/libgaim/protocols/qq/buddy_list.c =================================================================== --- trunk/libgaim/protocols/qq/buddy_list.c 2007-04-04 03:50:24 UTC (rev 18229) +++ trunk/libgaim/protocols/qq/buddy_list.c 2007-04-04 03:51:32 UTC (rev 18230) @@ -234,7 +234,7 @@ qq_send_packet_get_buddies_online(gc, position); } else { - /* qq_send_packet_get_buddies_levels(gc); */ + qq_send_packet_get_buddies_levels(gc); qq_refresh_all_buddy_status(gc); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-04-04 04:07:19
|
Revision: 18232 http://svn.sourceforge.net/gaim/?rev=18232&view=rev Author: markhuetsch Date: 2007-04-03 21:07:16 -0700 (Tue, 03 Apr 2007) Log Message: ----------- Fixed a bug where gaim was playing n x n times user leaving chat room sound when opening a QQ protocol chat room, n equaling the number of users in the chat room. Patch by gnap. Modified Paths: -------------- trunk/libgaim/protocols/qq/group_conv.c trunk/libgaim/protocols/qq/group_im.c Modified: trunk/libgaim/protocols/qq/group_conv.c =================================================================== --- trunk/libgaim/protocols/qq/group_conv.c 2007-04-04 04:02:28 UTC (rev 18231) +++ trunk/libgaim/protocols/qq/group_conv.c 2007-04-04 04:07:16 UTC (rev 18232) @@ -50,7 +50,7 @@ { GList *names, *list, *flags; qq_buddy *member; - gchar *member_name; + gchar *member_name, *member_uid; GaimConversation *conv; gint flag; g_return_if_fail(group != NULL); @@ -63,23 +63,40 @@ list = group->members; while (list != NULL) { member = (qq_buddy *) list->data; - /* always put it even offline */ - names = g_list_append(names, - /* we need unique identifiers for everyone in the chat or else we'll - * run into problems with functions like get_cb_real_name from qq.c */ - (member->nickname != NULL && *(member->nickname) != '\0') ? + /* we need unique identifiers for everyone in the chat or else we'll + * run into problems with functions like get_cb_real_name from qq.c */ + member_name = (member->nickname != NULL && *(member->nickname) != '\0') ? g_strdup_printf("%s (qq-%u)", member->nickname, member->uid) : - g_strdup_printf("(qq-%u)", member->uid)); + g_strdup_printf("(qq-%u)", member->uid); + member_uid = g_strdup_printf("(qq-%u)", member->uid); + flag = 0; /* TYPING to put online above OP and FOUNDER */ - if (is_online(member->status)) flag |= (GAIM_CBFLAGS_TYPING | GAIM_CBFLAGS_VOICE); + if (is_online(member->status)) + flag |= (GAIM_CBFLAGS_TYPING | GAIM_CBFLAGS_VOICE); if(1 == (member->role & 1)) flag |= GAIM_CBFLAGS_OP; if(member->uid == group->creator_uid) flag |= GAIM_CBFLAGS_FOUNDER; + + if(gaim_conv_chat_find_user(GAIM_CONV_CHAT(conv), member_name)) + { + gaim_conv_chat_user_set_flags(GAIM_CONV_CHAT(conv), + member_name, + flag); + }else if (gaim_conv_chat_find_user(GAIM_CONV_CHAT(conv), member_uid)) + { + gaim_conv_chat_user_set_flags(GAIM_CONV_CHAT(conv), + member_uid, + flag); + gaim_conv_chat_rename_user(GAIM_CONV_CHAT(conv), member_uid, member_name); + }else{ + /* always put it even offline */ + names = g_list_append(names, member_name); flags = g_list_append(flags, GINT_TO_POINTER(flag)); + } + g_free(member_uid); list = list->next; } - gaim_conv_chat_clear_users(GAIM_CONV_CHAT(conv)); gaim_conv_chat_add_users(GAIM_CONV_CHAT(conv), names, NULL, flags, FALSE); } /* clean up names */ Modified: trunk/libgaim/protocols/qq/group_im.c =================================================================== --- trunk/libgaim/protocols/qq/group_im.c 2007-04-04 04:02:28 UTC (rev 18231) +++ trunk/libgaim/protocols/qq/group_im.c 2007-04-04 04:07:16 UTC (rev 18232) @@ -63,6 +63,7 @@ g_return_if_fail(group != NULL && msg != NULL); msg_filtered = gaim_markup_strip_html(msg); + gaim_debug(GAIM_DEBUG_INFO, "QQ_MESG", "filterd qq qun mesg: %s\n", msg_filtered); msg_len = strlen(msg_filtered); data_len = 7 + msg_len + QQ_SEND_IM_AFTER_MSG_LEN; raw_data = g_newa(guint8, data_len); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |