comparison libpurple/protocols/msn/msn.c @ 25881:ca01403251f1

explicit merge of 'dabe77d56a2fc7c171caa81bd12d72ce8737a7a8' and 'b299a165920a9d922e9b8c27b4c879c77b43efe1'
author Richard Laager <rlaager@wiktel.com>
date Fri, 02 Jan 2009 21:47:52 +0000
parents be87547aa431 f3950234b164
children 94a6eb10c691
comparison
equal deleted inserted replaced
25880:be87547aa431 25881:ca01403251f1
1422 msn_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) 1422 msn_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group)
1423 { 1423 {
1424 MsnSession *session; 1424 MsnSession *session;
1425 MsnUserList *userlist; 1425 MsnUserList *userlist;
1426 const char *who, *gname; 1426 const char *who, *gname;
1427 MsnUser *user;
1427 1428
1428 session = gc->proto_data; 1429 session = gc->proto_data;
1429 userlist = session->userlist; 1430 userlist = session->userlist;
1430 who = msn_normalize(purple_connection_get_account(gc), purple_buddy_get_name(buddy)); 1431 who = msn_normalize(purple_connection_get_account(gc), purple_buddy_get_name(buddy));
1431 1432
1451 #endif 1452 #endif
1452 1453
1453 /* XXX - Would group ever be NULL here? I don't think so... 1454 /* XXX - Would group ever be NULL here? I don't think so...
1454 * shx: Yes it should; MSN handles non-grouped buddies, and this is only 1455 * shx: Yes it should; MSN handles non-grouped buddies, and this is only
1455 * internal. */ 1456 * internal. */
1456 if (msn_userlist_find_user(userlist, who) != NULL) { 1457 user = msn_userlist_find_user(userlist, who);
1457 /* We already know this buddy. This function takes care of users 1458 if ((user != NULL) && (user->networkid != MSN_NETWORK_UNKNOWN)) {
1458 already in the list and stuff... */ 1459 /* We already know this buddy and their network. This function knows
1460 what to do with users already in the list and stuff... */
1459 msn_userlist_add_buddy(userlist, who, gname); 1461 msn_userlist_add_buddy(userlist, who, gname);
1460 } else { 1462 } else {
1461 /* We need to check the network for this buddy first */ 1463 /* We need to check the network for this buddy first */
1462 msn_userlist_save_pending_buddy(userlist, who, gname); 1464 msn_userlist_save_pending_buddy(userlist, who, gname);
1463 msn_notification_send_fqy(session, who); 1465 msn_notification_send_fqy(session, who);