diff src/perl.c @ 4349:0c68d402f59f

[gaim-migrate @ 4614] XML Blist Gaim stores all the buddy lists in one big happy file now. You can order the buddies however you want, and they'll stay ordered that way. We can also store some per-buddy information now, which will be cool. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 19 Jan 2003 22:16:52 +0000
parents cddb50734169
children 5fb47ec9bfe4
line wrap: on
line diff
--- a/src/perl.c	Sun Jan 19 22:03:57 2003 +0000
+++ b/src/perl.c	Sun Jan 19 22:16:52 2003 +0000
@@ -635,22 +635,21 @@
 	struct gaim_connection *gc;
 	struct buddy *buddy;
 	struct group *g;
-	GSList *list = NULL;
+	GSList *list = groups;
 	GSList *mem;
 	int i = 0;
 	dXSARGS;
 	items = 0;
 
 	gc = (struct gaim_connection *)SvIV(ST(0));
-	if (g_slist_find(connections, gc))
-		list = gc->groups;
 
 	while (list) {
 		g = (struct group *)list->data;
 		mem = g->members;
 		while (mem) {
 			buddy = (struct buddy *)mem->data;
-			XST_mPV(i++, buddy->name);
+			if(buddy->user->gc == gc)
+				XST_mPV(i++, buddy->name);
 			mem = mem->next;
 		}
 		list = g_slist_next(list);
@@ -663,22 +662,20 @@
 	struct gaim_connection *gc;
 	struct buddy *b;
 	struct group *g;
-	GSList *list = NULL;
+	GSList *list = groups;
 	GSList *mem;
 	int i = 0;
 	dXSARGS;
 	items = 0;
 
 	gc = (struct gaim_connection *)SvIV(ST(0));
-	if (g_slist_find(connections, gc))
-		list = gc->groups;
 
 	while (list) {
 		g = (struct group *)list->data;
 		mem = g->members;
 		while (mem) {
 			b = (struct buddy *)mem->data;
-			if (b->present) XST_mPV(i++, b->name);
+			if (b->user->gc == gc && b->present) XST_mPV(i++, b->name);
 			mem = mem->next;
 		}
 		list = g_slist_next(list);
@@ -747,7 +744,7 @@
 
 	gc = (struct gaim_connection *)SvIV(ST(0));
 	if (g_slist_find(connections, gc))
-		buddy = find_buddy(gc, SvPV(ST(1), junk));
+		buddy = find_buddy(gc->user, SvPV(ST(1), junk));
 
 	if (!buddy)
 		XSRETURN(0);