diff libpurple/server.c @ 25635:efaecb71baad

propagate from branch 'im.pidgin.pidgin' (head 8ca6a80e2cd7fbbc59983f8ba370f7276e062db9) to branch 'im.pidgin.pidgin.vv' (head 3ed39e8792f4a2e92ef5a3c7f4fb14251c9dae11)
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 15 Mar 2008 07:39:15 +0000
parents 3232cc79fa51
children b398fe0a450e 92e71f6e10d4 ab1185e87ca5
line wrap: on
line diff
--- a/libpurple/server.c	Sat Mar 15 07:37:03 2008 +0000
+++ b/libpurple/server.c	Sat Mar 15 07:39:15 2008 +0000
@@ -274,6 +274,29 @@
 	}
 }
 
+void
+purple_serv_got_private_alias(PurpleConnection *gc, const char *who, const char *alias)
+{
+	PurpleAccount *account = NULL;
+	GSList *buddies = NULL;
+	PurpleBuddy *b = NULL;
+
+	account = purple_connection_get_account(gc);
+	buddies = purple_find_buddies(account, who);
+
+	while(buddies != NULL) {
+		b = buddies->data;
+
+		buddies = g_slist_delete_link(buddies, buddies);
+
+		if((!b->alias && !alias) || (b->alias && alias && !strcmp(b->alias, alias)))
+			continue;
+
+		purple_blist_alias_buddy(b, alias);
+	}
+}
+
+
 PurpleAttentionType *purple_get_attention_type_from_code(PurpleAccount *account, guint type_code)
 {
 	PurplePlugin *prpl;