# HG changeset patch # User Gary Kramlich # Date 1225424558 0 # Node ID 985ab911753eeff71de96dbb6b5ce9ebc5075151 # Parent 4d20fa86455b9b5c59520a86c306c820f4aeaf3a updated irc to use the api rather than structs directly diff -r 4d20fa86455b -r 985ab911753e libpurple/protocols/irc/irc.c --- a/libpurple/protocols/irc/irc.c Fri Oct 31 03:38:24 2008 +0000 +++ b/libpurple/protocols/irc/irc.c Fri Oct 31 03:42:38 2008 +0000 @@ -569,7 +569,7 @@ { struct irc_conn *irc = (struct irc_conn *)gc->proto_data; struct irc_buddy *ib = g_new0(struct irc_buddy, 1); - ib->name = g_strdup(buddy->name); + ib->name = g_strdup(purple_buddy_get_name(buddy)); g_hash_table_insert(irc->buddies, ib->name, ib); /* if the timer isn't set, this is during signon, so we don't want to flood @@ -582,7 +582,7 @@ static void irc_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) { struct irc_conn *irc = (struct irc_conn *)gc->proto_data; - g_hash_table_remove(irc->buddies, buddy->name); + g_hash_table_remove(irc->buddies, purple_buddy_get_name(buddy)); } static void read_input(struct irc_conn *irc, int len) diff -r 4d20fa86455b -r 985ab911753e libpurple/protocols/irc/msgs.c --- 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); } }