# HG changeset patch # User Richard Laager # Date 1120105467 0 # Node ID 34d2aac7b34f467ce0a671865523e493cc8cc608 # Parent aedd557f46dd28546d9eed9bee5015cbe9547262 [gaim-migrate @ 12938] Patch #1115930 from Richard Laager "Shows messages in the conversation window when the person at the other end of the conversation adds or removes you to/from his/her buddy list." committer: Tailor Script diff -r aedd557f46dd -r 34d2aac7b34f src/protocols/msn/userlist.c --- a/src/protocols/msn/userlist.c Thu Jun 30 04:16:15 2005 +0000 +++ b/src/protocols/msn/userlist.c Thu Jun 30 04:24:27 2005 +0000 @@ -258,6 +258,7 @@ else if (list_id == MSN_LIST_RL) { GaimConnection *gc; + GaimConversation *convo; gc = gaim_account_get_connection(account); @@ -265,6 +266,20 @@ "%s has added you to his or her contact list.\n", passport); + convo = gaim_find_conversation_with_account(GAIM_CONV_IM, passport, account); + if (convo) { + GaimBuddy *buddy; + char *msg; + + buddy = gaim_find_buddy(account, passport); + msg = g_strdup_printf( + _("%s has added you to his or her contact list."), + buddy ? gaim_buddy_get_contact_alias(buddy) : passport); + gaim_conv_im_write(GAIM_CONV_IM(convo), passport, msg, + GAIM_MESSAGE_SYSTEM, time(NULL)); + g_free(msg); + } + if (!(user->list_op & (MSN_LIST_AL_OP | MSN_LIST_BL_OP))) { got_new_entry(gc, passport, friendly); @@ -309,9 +324,25 @@ } else if (list_id == MSN_LIST_RL) { + GaimConversation *convo; + gaim_debug_info("msn", "%s has removed you from his or her contact list.\n", passport); + + convo = gaim_find_conversation_with_account(GAIM_CONV_IM, passport, account); + if (convo) { + GaimBuddy *buddy; + char *msg; + + buddy = gaim_find_buddy(account, passport); + msg = g_strdup_printf( + _("%s has removed you from his or her contact list."), + buddy ? gaim_buddy_get_contact_alias(buddy) : passport); + gaim_conv_im_write(GAIM_CONV_IM(convo), passport, msg, + GAIM_MESSAGE_SYSTEM, time(NULL)); + g_free(msg); + } } user->list_op &= ~(1 << list_id);