Mercurial > pidgin
diff libpurple/protocols/irc/msgs.c @ 25793:985ab911753e
updated irc to use the api rather than structs directly
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Fri, 31 Oct 2008 03:42:38 +0000 |
parents | e6b79961f69b |
children | da46097b4722 |
line wrap: on
line diff
--- a/libpurple/protocols/irc/msgs.c Fri Oct 31 03:38:24 2008 +0000 +++ b/libpurple/protocols/irc/msgs.c Fri Oct 31 03:42:38 2008 +0000 @@ -95,20 +95,29 @@ } /* this used to be in the core, but it's not now */ - for (gnode = purple_get_blist()->root; gnode; gnode = gnode->next) { + for (gnode = purple_blist_get_root(); + gnode; + gnode = purple_blist_node_get_sibling_next(gnode)) + { if(!PURPLE_BLIST_NODE_IS_GROUP(gnode)) continue; - for(cnode = gnode->child; cnode; cnode = cnode->next) { + for(cnode = purple_blist_node_get_first_child(gnode); + cnode; + cnode = purple_blist_node_get_sibling_next(cnode)) + { if(!PURPLE_BLIST_NODE_IS_CONTACT(cnode)) continue; - for(bnode = cnode->child; bnode; bnode = bnode->next) { + for(bnode = purple_blist_node_get_first_child(cnode); + bnode; + bnode = purple_blist_node_get_sibling_next(bnode)) + { PurpleBuddy *b; if(!PURPLE_BLIST_NODE_IS_BUDDY(bnode)) continue; b = (PurpleBuddy *)bnode; - if(b->account == gc->account) { + if(purple_buddy_get_account(b) == gc->account) { struct irc_buddy *ib = g_new0(struct irc_buddy, 1); - ib->name = g_strdup(b->name); + ib->name = g_strdup(purple_buddy_get_name(b)); g_hash_table_insert(irc->buddies, ib->name, ib); } }