changeset 8870:9e33e1fa6c97

[gaim-migrate @ 9638] credit to shx for discovering this bug, and credit to the rest of us for not seeing it in the past 3 1/2 years committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 04 May 2004 15:34:02 +0000
parents ab5a46dd132a
children b8c0a53b3022
files src/server.c
diffstat 1 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/server.c	Tue May 04 06:08:47 2004 +0000
+++ b/src/server.c	Tue May 04 15:34:02 2004 +0000
@@ -451,19 +451,20 @@
 		prpl_info->add_buddy(g, name, group);
 }
 
-void serv_add_buddies(GaimConnection *g, GList *buddies)
+void serv_add_buddies(GaimConnection *gc, GList *buddies)
 {
 	GaimPluginProtocolInfo *prpl_info = NULL;
 
-	if (g != NULL && g->prpl != NULL)
-		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(g->prpl);
+	if (gc != NULL && gc->prpl != NULL)
+		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
 
-	if (prpl_info && g_list_find(gaim_connections_get_all(), g)) {
+	if (prpl_info && g_list_find(gaim_connections_get_all(), gc)) {
 		if (prpl_info->add_buddies)
-			prpl_info->add_buddies(g, buddies);
+			prpl_info->add_buddies(gc, buddies);
 		else if (prpl_info->add_buddy) {
 			while (buddies) {
-				prpl_info->add_buddy(g, buddies->data, NULL);
+				GaimBuddy *b = buddies->data;
+				prpl_info->add_buddy(gc, b->name, gaim_find_buddys_group(b));
 				buddies = buddies->next;
 			}
 		}
@@ -536,12 +537,13 @@
 }
 
 void serv_got_alias(GaimConnection *gc, const char *who, const char *alias) {
-	GaimBuddy *b = gaim_find_buddy(gc->account, who);
+	GSList *buds, *buddies = gaim_find_buddies(gc->account, who);
+	GaimBuddy *b;
 
-	if(!b)
-		return;
-
-	gaim_blist_server_alias_buddy(b, alias);
+	for(buds = buddies; buds; buds = buds->next) {
+		b = buds->data;
+		gaim_blist_server_alias_buddy(b, alias);
+	}
 }
 
 /*