Mercurial > pidgin
diff src/protocols/silc/buddy.c @ 10869:3e43c132f151
[gaim-migrate @ 12556]
We no longer call "serv_add_buddies" at log in. Any PRPL that relied on
that should look through the buddy list itself and do whatever it needs
to after calling gaim_connection_set_state(gc, GAIM_CONNECTED);
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Mon, 25 Apr 2005 03:55:11 +0000 |
| parents | 54ac161a876e |
| children | f20813369fe8 |
line wrap: on
line diff
--- a/src/protocols/silc/buddy.c Mon Apr 25 03:41:16 2005 +0000 +++ b/src/protocols/silc/buddy.c Mon Apr 25 03:55:11 2005 +0000 @@ -1330,12 +1330,31 @@ silcgaim_add_buddy_i(gc, buddy, FALSE); } -void silcgaim_add_buddies(GaimConnection *gc, GList *buddies, GList *groups) +void silcgaim_send_buddylist(GaimConnection *gc) { - GList *curb = buddies; - while (curb != NULL) { - silcgaim_add_buddy_i(gc, curb->data, TRUE); - curb = curb->next; + GaimBuddyList *blist; + GaimBlistNode *gnode, *cnode, *bnode; + GaimBuddy *buddy; + + if ((blist = gaim_get_blist()) != NULL) + { + for (gnode = blist->root; gnode != NULL; gnode = gnode->next) + { + if (!GAIM_BLIST_NODE_IS_GROUP(gnode)) + continue; + for (cnode = gnode->child; cnode != NULL; cnode = cnode->next) + { + if (!GAIM_BLIST_NODE_IS_CONTACT(cnode)) + continue; + for (bnode = cnode->child; bnode != NULL; bnode = bnode->next) + { + if (!GAIM_BLIST_NODE_IS_BUDDY(bnode)) + continue; + buddy = (GaimBuddy *)bnode; + silcgaim_add_buddy_i(gc, buddy, TRUE); + } + } + } } }
