Mercurial > pidgin
changeset 11039:34d2aac7b34f
[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 <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 30 Jun 2005 04:24:27 +0000 |
parents | aedd557f46dd |
children | 3428ad6f5049 |
files | src/protocols/msn/userlist.c |
diffstat | 1 files changed, 31 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);