Mercurial > pidgin.yaz
changeset 14014:9c5790820ac6
[gaim-migrate @ 16606]
QQ no longer supports changing one's password through the client. Users must go to password.qq.com instead.
I also squashed a compiler warning.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Huetsch <markhuetsch> |
---|---|
date | Tue, 01 Aug 2006 16:15:39 +0000 |
parents | e9fe337fa9aa |
children | 9516a796ed5f |
files | src/protocols/qq/buddy_info.c src/protocols/qq/buddy_info.h src/protocols/qq/qq.c |
diffstat | 3 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/qq/buddy_info.c Tue Aug 01 13:08:03 2006 +0000 +++ b/src/protocols/qq/buddy_info.c Tue Aug 01 16:15:39 2006 +0000 @@ -180,7 +180,7 @@ } // info_fields are compared by their group positions -static gint info_field_compare(gconstpointer a, gconstpointer b, gpointer unused) +static gint info_field_compare(gconstpointer a, gconstpointer b) { return ((info_field *) a)->group_pos - ((info_field *) b)->group_pos; } @@ -318,31 +318,22 @@ } } -// send packet to modify personal information, and/or change password -void qq_send_packet_modify_info(GaimConnection *gc, contact_info *info, gchar *new_passwd) +// send packet to modify personal information +void qq_send_packet_modify_info(GaimConnection *gc, contact_info *info) { - GaimAccount *a; - gchar *old_passwd, *info_field[QQ_CONTACT_FIELDS]; + gchar *info_field[QQ_CONTACT_FIELDS]; gint i; guint8 *raw_data, *cursor, bar; g_return_if_fail(gc != NULL && info != NULL); - a = gc->account; - old_passwd = a->password; bar = 0x1f; raw_data = g_newa(guint8, MAX_PACKET_SIZE - 128); cursor = raw_data; g_memmove(info_field, info, sizeof(gchar *) * QQ_CONTACT_FIELDS); - if (new_passwd == NULL || strlen(new_passwd) == 0) - create_packet_b(raw_data, &cursor, bar); - else { // we're gonna change passwd - create_packet_data(raw_data, &cursor, (guint8 *) old_passwd, strlen(old_passwd)); - create_packet_b(raw_data, &cursor, bar); - create_packet_data(raw_data, &cursor, (guint8 *) new_passwd, strlen(new_passwd)); - } + create_packet_b(raw_data, &cursor, bar); // important!, skip the first uid entry for (i = 1; i < QQ_CONTACT_FIELDS; i++) { @@ -427,7 +418,7 @@ } info = (contact_info *) info_field; - qq_send_packet_modify_info(gc, info, NULL); + qq_send_packet_modify_info(gc, info); g_free(mid); for (i = 0; i < QQ_CONTACT_FIELDS; i++) g_free(info_field[i]);
--- a/src/protocols/qq/buddy_info.h Tue Aug 01 13:08:03 2006 +0000 +++ b/src/protocols/qq/buddy_info.h Tue Aug 01 16:15:39 2006 +0000 @@ -114,7 +114,7 @@ void qq_refresh_buddy_and_myself(contact_info *info, GaimConnection *gc); void qq_send_packet_get_info(GaimConnection *gc, guint32 uid, gboolean show_window); -void qq_send_packet_modify_info(GaimConnection *gc, contact_info *info, gchar *new_passwd); +void qq_send_packet_modify_info(GaimConnection *gc, contact_info *info); void qq_prepare_modify_info(GaimConnection *gc); void qq_process_modify_info_reply(guint8 *buf, gint buf_len, GaimConnection *gc); void qq_process_get_info_reply(guint8 *buf, gint buf_len, GaimConnection *gc);
--- a/src/protocols/qq/qq.c Tue Aug 01 13:08:03 2006 +0000 +++ b/src/protocols/qq/qq.c Tue Aug 01 16:15:39 2006 +0000 @@ -447,6 +447,12 @@ qq_prepare_modify_info(gc); } + +static void _qq_menu_change_password(GaimPluginAction * action) +{ + gaim_notify_uri(NULL, "https://password.qq.com"); +} + /* remove a buddy from my list and remove myself from his list */ /* TODO: re-enable this static void _qq_menu_block_buddy(GaimBlistNode * node) @@ -668,6 +674,9 @@ act = gaim_plugin_action_new(_("Modify My Information"), _qq_menu_modify_my_info); m = g_list_append(m, act); + act = gaim_plugin_action_new(_("Change Password"), _qq_menu_change_password); + m = g_list_append(m, act); + act = gaim_plugin_action_new(_("Show Login Information"), _qq_menu_show_login_info); m = g_list_append(m, act);