comparison src/gtkconv.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 b6f33ba0a0c0
children 01e349782075
comparison
equal deleted inserted replaced
4784:b1365291f002 4785:1e28e7d802a1
2200 } 2200 }
2201 2201
2202 static GList * 2202 static GList *
2203 generate_invite_user_names(struct gaim_connection *gc) 2203 generate_invite_user_names(struct gaim_connection *gc)
2204 { 2204 {
2205 GSList *grp = gaim_blist_groups(), *grp1; 2205 GaimBlistNode *gnode,*bnode;
2206 GSList *bl, *bl1;
2207 struct group *g; 2206 struct group *g;
2208 struct buddy *buddy; 2207 struct buddy *buddy;
2209 static GList *tmp = NULL; 2208 static GList *tmp = NULL;
2210 2209
2211 if (tmp) 2210 if (tmp)
2212 g_list_free(tmp); 2211 g_list_free(tmp);
2213 2212
2214 tmp = g_list_append(NULL, ""); 2213 tmp = g_list_append(NULL, "");
2215 2214
2216 if (gc != NULL) { 2215 if (gc != NULL) {
2217 for (grp1 = grp; grp1 != NULL; grp1 = grp1->next) { 2216 for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) {
2218 g = (struct group *)grp1->data; 2217 if(!GAIM_BLIST_NODE_IS_GROUP(gnode))
2219 bl = gaim_blist_members(g); 2218 continue;
2220 for (bl1 = bl; bl1 != NULL; bl1 = bl1->next) { 2219 g = (struct group *)gnode;
2221 buddy = (struct buddy *)bl1->data; 2220 for(bnode = gnode->child; bnode; bnode = bnode->next) {
2222 2221 if(!GAIM_BLIST_NODE_IS_BUDDY(bnode))
2223 if (buddy->present) 2222 continue;
2223 buddy = (struct buddy *)bnode;
2224
2225 if (buddy->account == gc->account && buddy->present)
2224 tmp = g_list_append(tmp, buddy->name); 2226 tmp = g_list_append(tmp, buddy->name);
2225 } 2227 }
2226 g_slist_free(bl); 2228 }
2227 }
2228 g_slist_free(grp);
2229 } 2229 }
2230 2230
2231 return tmp; 2231 return tmp;
2232 } 2232 }
2233 2233