# HG changeset patch # User Stu Tomlinson # Date 1128787731 0 # Node ID 45d54425dc65655841023f6357b21af53f730ee6 # Parent fd74e7b676823d710ac3099d886598733210c4fa [gaim-migrate @ 13899] Fix the bug where new buddies were showing up as groups sometimes, silence a few g_log warnings, and make it so that if you add and then remove a user on MSN without signing off and on in between the user is actually removed from the server list committer: Tailor Script diff -r fd74e7b67682 -r 45d54425dc65 src/blist.c --- a/src/blist.c Sat Oct 08 14:33:52 2005 +0000 +++ b/src/blist.c Sat Oct 08 16:08:51 2005 +0000 @@ -1089,11 +1089,11 @@ buddy->name = g_strdup(screenname); buddy->alias = g_strdup(alias); buddy->presence = gaim_presence_new_for_buddy(buddy); + ((GaimBlistNode *)buddy)->type = GAIM_BLIST_BUDDY_NODE; gaim_presence_set_status_active(buddy->presence, "offline", TRUE); gaim_blist_node_initialize_settings((GaimBlistNode *)buddy); - ((GaimBlistNode *)buddy)->type = GAIM_BLIST_BUDDY_NODE; if (ops && ops->new_node) ops->new_node((GaimBlistNode *)buddy); diff -r fd74e7b67682 -r 45d54425dc65 src/gtkblist.c --- a/src/gtkblist.c Sat Oct 08 14:33:52 2005 +0000 +++ b/src/gtkblist.c Sat Oct 08 16:08:51 2005 +0000 @@ -4058,6 +4058,9 @@ buddy = (GaimBuddy*)node; contact = (GaimContact*)node->parent; + if (contact == NULL) + return; + /* First things first, update the contact */ gaim_gtk_blist_update_contact(list, node->parent); diff -r fd74e7b67682 -r 45d54425dc65 src/protocols/msn/user.c --- a/src/protocols/msn/user.c Sat Oct 08 14:33:52 2005 +0000 +++ b/src/protocols/msn/user.c Sat Oct 08 16:08:51 2005 +0000 @@ -94,7 +94,8 @@ account = user->userlist->session->account; gc = gaim_account_get_connection(account); - gaim_prpl_got_user_status(account, user->passport, user->status, NULL); + if (user->status != NULL) + gaim_prpl_got_user_status(account, user->passport, user->status, NULL); if (user->idle) gaim_prpl_got_user_idle(account, user->passport, TRUE, -1); diff -r fd74e7b67682 -r 45d54425dc65 src/protocols/msn/userlist.c --- a/src/protocols/msn/userlist.c Sat Oct 08 14:33:52 2005 +0000 +++ b/src/protocols/msn/userlist.c Sat Oct 08 16:08:51 2005 +0000 @@ -240,7 +240,6 @@ if (group_id >= 0) { msn_user_add_group_id(user, group_id); - return; } else { diff -r fd74e7b67682 -r 45d54425dc65 src/status.c --- a/src/status.c Sat Oct 08 14:33:52 2005 +0000 +++ b/src/status.c Sat Oct 08 16:08:51 2005 +0000 @@ -619,12 +619,12 @@ const char *buddy_alias = gaim_buddy_get_alias(buddy); char *tmp = NULL; - if (!gaim_status_is_available(old_status) && + if (((old_status == NULL) || !gaim_status_is_available(old_status)) && gaim_status_is_available(new_status)) { tmp = g_strdup_printf(_("%s came back"), buddy_alias); } - else if (gaim_status_is_available(old_status) && + else if ((old_status != NULL) && gaim_status_is_available(old_status) && !gaim_status_is_available(new_status)) { tmp = g_strdup_printf(_("%s went away"), buddy_alias);