Mercurial > pidgin.yaz
diff libpurple/protocols/qq/group_im.c @ 24077:ce94189f15ad
Flos Lonicerae <lonicerae(at)gmail.com>
* Merge lonicerae and ccpaging into trunk
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Wed, 22 Oct 2008 14:52:26 +0000 |
parents | ec3f7d3e0445 |
children | 1bdf7b602684 |
line wrap: on
line diff
--- a/libpurple/protocols/qq/group_im.c Wed Oct 22 14:49:38 2008 +0000 +++ b/libpurple/protocols/qq/group_im.c Wed Oct 22 14:52:26 2008 +0000 @@ -107,7 +107,7 @@ g_return_if_fail(ext_id > 0 && user_uid > 0); - bytes += convert_as_pascal_string(data + bytes, &reason_utf8, QQ_CHARSET_DEFAULT); + bytes += qq_get_vstr(&reason_utf8, QQ_CHARSET_DEFAULT, data + bytes); msg = g_strdup_printf(_("%d request to join Qun %d"), user_uid, ext_id); reason = g_strdup_printf(_("Message: %s"), reason_utf8); @@ -161,7 +161,7 @@ if (uid_from != 0) { buddy = qq_group_find_member_by_uid(group, uid_from); if (buddy == NULL || buddy->nickname == NULL) - from = uid_to_purple_name(uid_from); + from = g_strdup_printf("%d", uid_from); else from = g_strdup(buddy->nickname); } else { @@ -192,7 +192,7 @@ g_return_if_fail(ext_id > 0 && admin_uid > 0); - bytes += convert_as_pascal_string(data + bytes, &reason_utf8, QQ_CHARSET_DEFAULT); + bytes += qq_get_vstr(&reason_utf8, QQ_CHARSET_DEFAULT, data + bytes); msg = g_strdup_printf (_("Failed to join Qun %d, operated by admin %d"), ext_id, admin_uid); @@ -231,7 +231,7 @@ g_return_if_fail(ext_id > 0 && admin_uid > 0); /* it is also a "无" here, so do not display */ - bytes += convert_as_pascal_string(data + bytes, &reason, QQ_CHARSET_DEFAULT); + bytes += qq_get_vstr(&reason, QQ_CHARSET_DEFAULT, data + bytes); group = qq_room_search_id(gc, id); if (group != NULL) { @@ -317,7 +317,7 @@ } /* recv an IM from a group chat */ -void qq_process_room_msg_normal(guint8 *data, gint data_len, guint32 id, PurpleConnection *gc, guint16 im_type) +void qq_process_room_msg_normal(guint8 *data, gint data_len, guint32 id, PurpleConnection *gc, guint16 msg_type) { gchar *msg_with_purple_smiley, *msg_utf8_encoded; qq_data *qd; @@ -353,7 +353,7 @@ bytes += qq_get32(&(packet.ext_id), data + bytes); bytes += qq_get8(&(packet.type8), data + bytes); - if(QQ_RECV_IM_TEMP_QUN_IM == im_type) { + if(QQ_MSG_TEMP_QUN_IM == msg_type) { bytes += qq_get32(&(id), data + bytes); } @@ -384,7 +384,7 @@ * buf.getInt(); */ - if(im_type != QQ_RECV_IM_UNKNOWN_QUN_IM) + if(msg_type != QQ_MSG_UNKNOWN_QUN_IM) skip_len = 10; else skip_len = 0;