| 268 static void |
268 static void |
| 269 msn_session_sync_users(MsnSession *session) |
269 msn_session_sync_users(MsnSession *session) |
| 270 { |
270 { |
| 271 PurpleBlistNode *gnode, *cnode, *bnode; |
271 PurpleBlistNode *gnode, *cnode, *bnode; |
| 272 PurpleConnection *gc = purple_account_get_connection(session->account); |
272 PurpleConnection *gc = purple_account_get_connection(session->account); |
| |
273 GList *to_remove = NULL; |
| 273 |
274 |
| 274 g_return_if_fail(gc != NULL); |
275 g_return_if_fail(gc != NULL); |
| 275 |
276 |
| 276 /* The core used to use msn_add_buddy to add all buddies before |
277 /* The core used to use msn_add_buddy to add all buddies before |
| 277 * being logged in. This no longer happens, so we manually iterate |
278 * being logged in. This no longer happens, so we manually iterate |
| 310 break; |
311 break; |
| 311 } |
312 } |
| 312 } |
313 } |
| 313 } |
314 } |
| 314 |
315 |
| |
316 /* We don't care if they're in a different group, as long as they're on the |
| |
317 * list somewhere. If we check for the group, we cause pain, agony and |
| |
318 * suffering for people who decide to re-arrange their buddy list elsewhere. |
| |
319 */ |
| 315 if (!found) |
320 if (!found) |
| 316 { |
321 { |
| 317 /* The user was not on the server list or not in that group |
322 if ((remote_user == NULL) || !(remote_user->list_op & MSN_LIST_FL_OP)) { |
| 318 * on the server list */ |
323 /* The user is not on the server list */ |
| 319 msn_show_sync_issue(session, purple_buddy_get_name(b), group_name); |
324 msn_show_sync_issue(session, purple_buddy_get_name(b), group_name); |
| |
325 } else { |
| |
326 /* The user is not in that group on the server list */ |
| |
327 to_remove = g_list_prepend(to_remove, b); |
| |
328 } |
| 320 } |
329 } |
| 321 } |
330 } |
| 322 } |
331 } |
| 323 } |
332 } |
| |
333 } |
| |
334 |
| |
335 if (to_remove != NULL) { |
| |
336 g_list_foreach(to_remove, (GFunc)purple_blist_remove_buddy, NULL); |
| |
337 g_list_free(to_remove); |
| 324 } |
338 } |
| 325 } |
339 } |
| 326 |
340 |
| 327 void |
341 void |
| 328 msn_session_set_error(MsnSession *session, MsnErrorType error, |
342 msn_session_set_error(MsnSession *session, MsnErrorType error, |