src/multi.c

changeset 5234
8320a1cb0274
parent 5228
83adaad2deb1
child 5314
56ef6a09fb99
equal deleted inserted replaced
5233:bb9f6f5ccdc7 5234:8320a1cb0274
165 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) { 165 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) {
166 if(!GAIM_BLIST_NODE_IS_GROUP(gnode)) 166 if(!GAIM_BLIST_NODE_IS_GROUP(gnode))
167 continue; 167 continue;
168 m = (struct group *)gnode; 168 m = (struct group *)gnode;
169 for(bnode = gnode->child; bnode; bnode = bnode->next) { 169 for(bnode = gnode->child; bnode; bnode = bnode->next) {
170 if(!GAIM_BLIST_NODE_IS_BUDDY(bnode)) 170 if(GAIM_BLIST_NODE_IS_BUDDY(bnode)) {
171 continue; 171 n = (struct buddy *)bnode;
172 n = (struct buddy *)bnode; 172 if(n->account == gc->account) {
173 if(n->account == gc->account) { 173 n->present = GAIM_BUDDY_OFFLINE;
174 n->present = GAIM_BUDDY_OFFLINE; 174 }
175 } 175 }
176 } 176 }
177 } 177 }
178 g_free(gc->away); 178 g_free(gc->away);
179 g_free(gc->away_state); 179 g_free(gc->away_state);
1461 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) { 1461 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) {
1462 struct group *g = (struct group *)gnode; 1462 struct group *g = (struct group *)gnode;
1463 if(!GAIM_BLIST_NODE_IS_GROUP(gnode)) 1463 if(!GAIM_BLIST_NODE_IS_GROUP(gnode))
1464 continue; 1464 continue;
1465 for(bnode = gnode->child; bnode; bnode = bnode->next) { 1465 for(bnode = gnode->child; bnode; bnode = bnode->next) {
1466 struct buddy *b = (struct buddy *)bnode; 1466 if(GAIM_BLIST_NODE_IS_BUDDY(bnode)) {
1467 if(!GAIM_BLIST_NODE_IS_BUDDY(bnode)) 1467 struct buddy *b = (struct buddy *)bnode;
1468 continue; 1468 if(b->account == account)
1469 if(b->account == account) { 1469 gaim_blist_remove_buddy(b);
1470 gaim_blist_remove_buddy(b); 1470 } else if(GAIM_BLIST_NODE_IS_CHAT(bnode)) {
1471 struct chat *chat = (struct chat *)bnode;
1472 if(chat->account == account)
1473 gaim_blist_remove_chat(chat);
1471 } 1474 }
1472 } 1475 }
1473 if(!gnode->child) { 1476 if(!gnode->child) {
1474 gaim_blist_remove_group(g); 1477 gaim_blist_remove_group(g);
1475 } 1478 }
1704 1707
1705 update_privacy_connections(); 1708 update_privacy_connections();
1706 do_away_menu(); 1709 do_away_menu();
1707 do_proto_menu(); 1710 do_proto_menu();
1708 1711
1712 gaim_blist_add_account(gc->account);
1713
1709 /* 1714 /*
1710 * XXX This is a hack! Remove this and replace it with a better event 1715 * XXX This is a hack! Remove this and replace it with a better event
1711 * notification system. 1716 * notification system.
1712 */ 1717 */
1713 for (wins = gaim_get_windows(); wins != NULL; wins = wins->next) { 1718 for (wins = gaim_get_windows(); wins != NULL; wins = wins->next) {
1742 /* let the prpl know what buddies we pulled out of the local list */ 1747 /* let the prpl know what buddies we pulled out of the local list */
1743 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) { 1748 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) {
1744 if(!GAIM_BLIST_NODE_IS_GROUP(gnode)) 1749 if(!GAIM_BLIST_NODE_IS_GROUP(gnode))
1745 continue; 1750 continue;
1746 for(bnode = gnode->child; bnode; bnode = bnode->next) { 1751 for(bnode = gnode->child; bnode; bnode = bnode->next) {
1747 struct buddy *b = (struct buddy *)bnode; 1752 if(GAIM_BLIST_NODE_IS_BUDDY(bnode)) {
1748 if(!GAIM_BLIST_NODE_IS_BUDDY(bnode)) 1753 struct buddy *b = (struct buddy *)bnode;
1749 continue; 1754 if(b->account == gc->account) {
1750 if(b->account == gc->account) { 1755 add_buds = g_list_append(add_buds, b->name);
1751 add_buds = g_list_append(add_buds, b->name); 1756 }
1752 } 1757 }
1753 } 1758 }
1754 } 1759 }
1755 1760
1756 if(add_buds) { 1761 if(add_buds) {

mercurial