Mercurial > pidgin.yaz
diff src/protocols/toc/toc.c @ 4785:1e28e7d802a1
[gaim-migrate @ 5105]
fix a few things, get rid of a few stale functions, and get rid of the
compatibility functions. wee!
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 15 Mar 2003 03:23:30 +0000 |
parents | c4c28874ecd3 |
children | 677d3cb193a1 |
line wrap: on
line diff
--- a/src/protocols/toc/toc.c Sat Mar 15 01:07:08 2003 +0000 +++ b/src/protocols/toc/toc.c Sat Mar 15 03:23:30 2003 +0000 @@ -267,9 +267,7 @@ static void toc_build_config(struct gaim_account *account, char *s, int len, gboolean show) { - GSList *grp = gaim_blist_groups(); - GSList *grp1 = grp; - GSList *mem, *mem1; + GaimBlistNode *gnode,*bnode; struct group *g; struct buddy *b; GSList *plist = account->permit; @@ -281,26 +279,24 @@ account->permdeny = 1; pos += g_snprintf(&s[pos], len - pos, "m %d\n", account->permdeny); - while (len > pos && grp1) { - g = (struct group *)grp1->data; + for(gnode = gaim_get_blist()->root; gnode && len > pos; gnode = gnode->next) { + g = (struct group *)gnode; + if(!GAIM_BLIST_NODE_IS_GROUP(gnode)) + continue; if(gaim_group_on_account(g, account)) { pos += g_snprintf(&s[pos], len - pos, "g %s\n", g->name); - mem = gaim_blist_members(g); - mem1 = mem; - while (len > pos && mem1) { - b = (struct buddy *)mem1->data; + for(bnode = gnode->child; bnode && len > pos; bnode = bnode->next) { + b = (struct buddy *)bnode; + if(!GAIM_BLIST_NODE_IS_BUDDY(bnode)) + continue; if(b->account == account) { pos += g_snprintf(&s[pos], len - pos, "b %s%s%s\n", b->name, (show && b->alias) ? ":" : "", (show && b->alias) ? b->alias : ""); } - mem1 = mem1->next; } - g_slist_free(mem); } - grp1 = g_slist_next(grp1); } - g_slist_free(grp); while (len > pos && plist) { pos += g_snprintf(&s[pos], len - pos, "p %s\n", (char *)plist->data);