comparison libpurple/protocols/qq/buddy_list.c @ 24068:87e61a85f5dd

2008.09.28 - ccpaging <ccpaging(at)gmail.com> * The source is only for debug, not for user: 1. Implement new QQ protocol 2007/2008, include login and change status 2. Check 2005's login reply packet, get last 3 login time. 3. Server's notice and news is displayed in self buddy (The new buddy created in buddy list). 4. The notice messages when adding/removing QQ Qun's buddy displayed in char conversation. They are displayed as purple notify windows in the past. 5. The notice messages when adding/removing buddy displayed in self buddy's conversation. They are displayed as purple notify windows in the past. 6. Client version can be selected in account option. Now only qq2005 is working, other new version is only for debug.
author SHiNE CsyFeK <csyfek@gmail.com>
date Wed, 22 Oct 2008 14:40:04 +0000
parents dbc7a9742f8d
children 619ac2303c46
comparison
equal deleted inserted replaced
24067:fc546485fae7 24068:87e61a85f5dd
480 misc_status = 0x00000000; 480 misc_status = 0x00000000;
481 fake_video = purple_prefs_get_bool("/plugins/prpl/qq/show_fake_video"); 481 fake_video = purple_prefs_get_bool("/plugins/prpl/qq/show_fake_video");
482 if (fake_video) 482 if (fake_video)
483 misc_status |= QQ_MISC_STATUS_HAVING_VIIDEO; 483 misc_status |= QQ_MISC_STATUS_HAVING_VIIDEO;
484 484
485 bytes = 0; 485 if (qd->client_version > 2005) {
486 bytes += qq_put8(raw_data + bytes, away_cmd); 486 bytes = 0;
487 bytes += qq_put32(raw_data + bytes, misc_status); 487 bytes += qq_put8(raw_data + bytes, away_cmd);
488 488 /* status version */
489 bytes += qq_put16(raw_data + bytes, 0);
490 bytes += qq_put16(raw_data + bytes, 0);
491 bytes += qq_put32(raw_data + bytes, misc_status);
492 /* Fixme: custom status message, now is empty */
493 bytes += qq_put16(raw_data + bytes, 0);
494 } else {
495 bytes = 0;
496 bytes += qq_put8(raw_data + bytes, away_cmd);
497 bytes += qq_put32(raw_data + bytes, misc_status);
498 }
489 qq_send_cmd_mess(gc, QQ_CMD_CHANGE_STATUS, raw_data, bytes, update_class, 0); 499 qq_send_cmd_mess(gc, QQ_CMD_CHANGE_STATUS, raw_data, bytes, update_class, 0);
490 } 500 }
491 501
492 /* parse the reply packet for change_status */ 502 /* parse the reply packet for change_status */
493 void qq_process_change_status_reply(guint8 *data, gint data_len, PurpleConnection *gc) 503 void qq_process_change_status_reply(guint8 *data, gint data_len, PurpleConnection *gc)