| 824 static void qq_refresh_buddy_and_myself(contact_info *info, PurpleConnection *gc) |
824 static void qq_refresh_buddy_and_myself(contact_info *info, PurpleConnection *gc) |
| 825 { |
825 { |
| 826 PurpleBuddy *b; |
826 PurpleBuddy *b; |
| 827 qq_data *qd; |
827 qq_data *qd; |
| 828 qq_buddy *q_bud; |
828 qq_buddy *q_bud; |
| 829 gchar *alias_utf8; |
829 gchar *alias_utf8, *purple_name; |
| 830 gchar *purple_name; |
|
| 831 PurpleAccount *account = purple_connection_get_account(gc); |
830 PurpleAccount *account = purple_connection_get_account(gc); |
| 832 |
831 |
| 833 qd = (qq_data *) gc->proto_data; |
832 qd = (qq_data *) gc->proto_data; |
| 834 purple_name = uid_to_purple_name(strtol(info->uid, NULL, 10)); |
833 purple_name = uid_to_purple_name(strtol(info->uid, NULL, 10)); |
| 835 |
834 |
| 1008 bytes += qq_get32(&uid, decr_buf + bytes); |
1007 bytes += qq_get32(&uid, decr_buf + bytes); |
| 1009 bytes += qq_get32(&onlineTime, decr_buf + bytes); |
1008 bytes += qq_get32(&onlineTime, decr_buf + bytes); |
| 1010 bytes += qq_get16(&level, decr_buf + bytes); |
1009 bytes += qq_get16(&level, decr_buf + bytes); |
| 1011 bytes += qq_get16(&timeRemainder, decr_buf + bytes); |
1010 bytes += qq_get16(&timeRemainder, decr_buf + bytes); |
| 1012 purple_debug(PURPLE_DEBUG_INFO, "QQ", |
1011 purple_debug(PURPLE_DEBUG_INFO, "QQ", |
| 1013 "Level uid: %d, onlineTime: %d, level: %d, timeRemainder: %d\n", |
1012 "Level packet entry:\nuid: %d\nonlineTime: %d\nlevel: %d\ntimeRemainder: %d\n", |
| 1014 uid, onlineTime, level, timeRemainder); |
1013 uid, onlineTime, level, timeRemainder); |
| 1015 purple_name = uid_to_purple_name(uid); |
1014 purple_name = uid_to_purple_name(uid); |
| 1016 b = purple_find_buddy(account, purple_name); |
1015 b = purple_find_buddy(account, purple_name); |
| 1017 q_bud = (b == NULL) ? NULL : (qq_buddy *) b->proto_data; |
1016 q_bud = (b == NULL) ? NULL : (qq_buddy *) b->proto_data; |
| 1018 |
1017 |