comparison src/protocols/msn/userlist.c @ 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 d83f745c997b
children e9eeacd1a8d0
comparison
equal deleted inserted replaced
11038:aedd557f46dd 11039:34d2aac7b34f
256 gaim_privacy_deny_add(account, passport, TRUE); 256 gaim_privacy_deny_add(account, passport, TRUE);
257 } 257 }
258 else if (list_id == MSN_LIST_RL) 258 else if (list_id == MSN_LIST_RL)
259 { 259 {
260 GaimConnection *gc; 260 GaimConnection *gc;
261 GaimConversation *convo;
261 262
262 gc = gaim_account_get_connection(account); 263 gc = gaim_account_get_connection(account);
263 264
264 gaim_debug_info("msn", 265 gaim_debug_info("msn",
265 "%s has added you to his or her contact list.\n", 266 "%s has added you to his or her contact list.\n",
266 passport); 267 passport);
267 268
269 convo = gaim_find_conversation_with_account(GAIM_CONV_IM, passport, account);
270 if (convo) {
271 GaimBuddy *buddy;
272 char *msg;
273
274 buddy = gaim_find_buddy(account, passport);
275 msg = g_strdup_printf(
276 _("%s has added you to his or her contact list."),
277 buddy ? gaim_buddy_get_contact_alias(buddy) : passport);
278 gaim_conv_im_write(GAIM_CONV_IM(convo), passport, msg,
279 GAIM_MESSAGE_SYSTEM, time(NULL));
280 g_free(msg);
281 }
282
268 if (!(user->list_op & (MSN_LIST_AL_OP | MSN_LIST_BL_OP))) 283 if (!(user->list_op & (MSN_LIST_AL_OP | MSN_LIST_BL_OP)))
269 { 284 {
270 got_new_entry(gc, passport, friendly); 285 got_new_entry(gc, passport, friendly);
271 } 286 }
272 } 287 }
307 { 322 {
308 gaim_privacy_deny_remove(account, passport, TRUE); 323 gaim_privacy_deny_remove(account, passport, TRUE);
309 } 324 }
310 else if (list_id == MSN_LIST_RL) 325 else if (list_id == MSN_LIST_RL)
311 { 326 {
327 GaimConversation *convo;
328
312 gaim_debug_info("msn", 329 gaim_debug_info("msn",
313 "%s has removed you from his or her contact list.\n", 330 "%s has removed you from his or her contact list.\n",
314 passport); 331 passport);
332
333 convo = gaim_find_conversation_with_account(GAIM_CONV_IM, passport, account);
334 if (convo) {
335 GaimBuddy *buddy;
336 char *msg;
337
338 buddy = gaim_find_buddy(account, passport);
339 msg = g_strdup_printf(
340 _("%s has removed you from his or her contact list."),
341 buddy ? gaim_buddy_get_contact_alias(buddy) : passport);
342 gaim_conv_im_write(GAIM_CONV_IM(convo), passport, msg,
343 GAIM_MESSAGE_SYSTEM, time(NULL));
344 g_free(msg);
345 }
315 } 346 }
316 347
317 user->list_op &= ~(1 << list_id); 348 user->list_op &= ~(1 << list_id);
318 /* gaim_user_remove_list_id (user, list_id); */ 349 /* gaim_user_remove_list_id (user, list_id); */
319 350