diff src/protocols/jabber/jabber.c @ 4227:a614423c648f

[gaim-migrate @ 4471] This is a patch from Nathan Walp that adds a "char server_alias[BUDDY_ALIAS_MAXLEN]" to struct buddy, and a preference option to show the server alias instead of the alias set by you. It shouldn't cause any problems. But then again, faceprint is a crazy patch writer, with an emphasis on crazy, if you know what I mean. Huh? Get it? "Crazy"? I kill me. But right after I kill Time Warner. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 07 Jan 2003 17:44:34 +0000
parents 474265997752
children c1857c9c912d
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c	Tue Jan 07 16:18:08 2003 +0000
+++ b/src/protocols/jabber/jabber.c	Tue Jan 07 17:44:34 2003 +0000
@@ -1780,9 +1780,8 @@
 					serv_got_update(GJ_GC(gjc), buddyname, 1, 0, signon, idle,
 							uc, 0);
 				}
-			} else if(name != NULL && strcmp(b->show, name)) {
-				strncpy(b->show, name, BUDDY_ALIAS_MAXLEN);
-				b->show[BUDDY_ALIAS_MAXLEN - 1] = '\0';	/* cheap safety feature */
+			} else if(name != NULL && strcmp(b->alias, name)) {
+				g_snprintf(b->alias, sizeof(b->alias), "%s", name);
 				handle_buddy_rename(b, buddyname);
 			}
 		}
@@ -2525,7 +2524,7 @@
 		if(alias && alias[0] != '\0') {
 			my_alias = alias;
 		} else if((buddy = find_buddy(gc, realwho)) != NULL) {
-			my_alias = buddy->show;
+			my_alias = buddy->alias;
 		}
 
 		/* If there's an alias for the buddy, it's not 0-length