changeset 4783:66be56dc86cb

[gaim-migrate @ 5103] This re-enables server-stored aliases for AIM and ICQ, and it includes a fix for the problem The Sean was having. Gaim is too sexy. It needs to put its shirt back on before something breaks. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 15 Mar 2003 00:18:54 +0000
parents fd69b80cb349
children b1365291f002
files src/dialogs.c src/protocols/oscar/oscar.c
diffstat 2 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/dialogs.c	Fri Mar 14 23:53:28 2003 +0000
+++ b/src/dialogs.c	Sat Mar 15 00:18:54 2003 +0000
@@ -3348,11 +3348,7 @@
 static void do_alias_bud(GtkWidget *w, struct buddy *b)
 {
 	const char *al = gtk_entry_get_text(GTK_ENTRY(aliasname));
-	if (al && strlen(al))
-		g_snprintf(b->alias, sizeof(b->alias), "%s", al);
-	else
-		b->alias[0] = '\0';
-	gaim_blist_alias_buddy (b, al);
+	gaim_blist_alias_buddy (b, (al && strlen(al)) ? al : NULL);
 	serv_alias_buddy(b);
 	gaim_blist_save();
 	destroy_dialog(aliasdlg, aliasdlg);
--- a/src/protocols/oscar/oscar.c	Fri Mar 14 23:53:28 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Sat Mar 15 00:18:54 2003 +0000
@@ -4508,13 +4508,11 @@
 							g_free(servernick);
 						}
 						if (aim_ssi_itemlist_exists(sess->ssi.local, buddy->name)) {
-#if 0
 							/* Store local alias on server */
 							char *alias = aim_ssi_getalias(sess->ssi.local, group->name, buddy->name);
-							if (!alias && buddy->alias)
+							if (!alias && buddy->alias && strlen(buddy->alias))
 								aim_ssi_aliasbuddy(sess, od->conn, group->name, buddy->name, buddy->alias);
 							free(alias);
-#endif
 						} else {
 							debug_printf("ssi: adding buddy %s from local list to server list\n", buddy->name);
 							aim_ssi_addbuddy(sess, od->conn, buddy->name, group->name, gaim_get_buddy_alias_only(buddy), NULL, NULL, 0);