| 379 GaimGtkWindow *gtkwin; |
379 GaimGtkWindow *gtkwin; |
| 380 |
380 |
| 381 g_return_if_fail(account != NULL); |
381 g_return_if_fail(account != NULL); |
| 382 g_return_if_fail(username != NULL); |
382 g_return_if_fail(username != NULL); |
| 383 |
383 |
| 384 conv = gaim_find_conversation_with_account(username, account); |
384 conv = gaim_find_conversation_with_account(GAIM_CONV_IM, username, account); |
| 385 |
385 |
| 386 if (conv == NULL) |
386 if (conv == NULL) |
| 387 conv = gaim_conversation_new(GAIM_CONV_IM, account, username); |
387 conv = gaim_conversation_new(GAIM_CONV_IM, account, username); |
| 388 |
388 |
| 389 win = gaim_conversation_get_window(conv); |
389 win = gaim_conversation_get_window(conv); |
| 763 GaimBuddy *buddy; |
763 GaimBuddy *buddy; |
| 764 if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) { |
764 if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) { |
| 765 GaimConversation *conv; |
765 GaimConversation *conv; |
| 766 buddy = (GaimBuddy*)bnode; |
766 buddy = (GaimBuddy*)bnode; |
| 767 bnode = bnode->next; |
767 bnode = bnode->next; |
| 768 conv = gaim_find_conversation_with_account(buddy->name, buddy->account); |
768 conv = gaim_find_conversation_with_account(GAIM_CONV_IM, |
| |
769 buddy->name, |
| |
770 buddy->account); |
| 769 if (gaim_account_is_connected(buddy->account)) { |
771 if (gaim_account_is_connected(buddy->account)) { |
| 770 serv_remove_buddy(buddy->account->gc, buddy, group); |
772 serv_remove_buddy(buddy->account->gc, buddy, group); |
| 771 gaim_blist_remove_buddy(buddy); |
773 gaim_blist_remove_buddy(buddy); |
| 772 if (conv) |
774 if (conv) |
| 773 gaim_conversation_update(conv, |
775 gaim_conversation_update(conv, |
| 822 gaim_debug_info("blist", "Removing '%s' from buddy list.\n", buddy->name); |
825 gaim_debug_info("blist", "Removing '%s' from buddy list.\n", buddy->name); |
| 823 /* TODO - Should remove from blist first... then call serv_remove_buddy()? */ |
826 /* TODO - Should remove from blist first... then call serv_remove_buddy()? */ |
| 824 serv_remove_buddy(buddy->account->gc, buddy, group); |
827 serv_remove_buddy(buddy->account->gc, buddy, group); |
| 825 gaim_blist_remove_buddy(buddy); |
828 gaim_blist_remove_buddy(buddy); |
| 826 |
829 |
| 827 conv = gaim_find_conversation_with_account(name, account); |
830 conv = gaim_find_conversation_with_account(GAIM_CONV_IM, name, account); |
| 828 |
|
| 829 if (conv != NULL) |
831 if (conv != NULL) |
| 830 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); |
832 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); |
| 831 |
833 |
| 832 g_free(name); |
834 g_free(name); |
| 833 } |
835 } |
| 862 name = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name(chat->components); |
864 name = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name(chat->components); |
| 863 |
865 |
| 864 gaim_blist_remove_chat(chat); |
866 gaim_blist_remove_chat(chat); |
| 865 |
867 |
| 866 if (name != NULL) { |
868 if (name != NULL) { |
| 867 conv = gaim_find_conversation_with_account(name, account); |
869 conv = gaim_find_conversation_with_account(GAIM_CONV_CHAT, name, account); |
| 868 g_free(name); |
870 g_free(name); |
| 869 } |
871 } |
| 870 |
872 |
| 871 if (conv != NULL) |
873 if (conv != NULL) |
| 872 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); |
874 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); |