comparison 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
comparison
equal deleted inserted replaced
4226:a7d1eddc0afc 4227:a614423c648f
1778 do_export(GJ_GC(gjc)); 1778 do_export(GJ_GC(gjc));
1779 if(present) { 1779 if(present) {
1780 serv_got_update(GJ_GC(gjc), buddyname, 1, 0, signon, idle, 1780 serv_got_update(GJ_GC(gjc), buddyname, 1, 0, signon, idle,
1781 uc, 0); 1781 uc, 0);
1782 } 1782 }
1783 } else if(name != NULL && strcmp(b->show, name)) { 1783 } else if(name != NULL && strcmp(b->alias, name)) {
1784 strncpy(b->show, name, BUDDY_ALIAS_MAXLEN); 1784 g_snprintf(b->alias, sizeof(b->alias), "%s", name);
1785 b->show[BUDDY_ALIAS_MAXLEN - 1] = '\0'; /* cheap safety feature */
1786 handle_buddy_rename(b, buddyname); 1785 handle_buddy_rename(b, buddyname);
1787 } 1786 }
1788 } 1787 }
1789 } else if (BUD_USUB_TO_PEND(sub, ask) || BUD_USUBD_TO(sub, ask) || !strcasecmp(sub, "remove")) { 1788 } else if (BUD_USUB_TO_PEND(sub, ask) || BUD_USUBD_TO(sub, ask) || !strcasecmp(sub, "remove")) {
1790 jabber_remove_gaim_buddy(GJ_GC(gjc), buddyname); 1789 jabber_remove_gaim_buddy(GJ_GC(gjc), buddyname);
2523 * one out of current Gaim buddylist data for him. 2522 * one out of current Gaim buddylist data for him.
2524 */ 2523 */
2525 if(alias && alias[0] != '\0') { 2524 if(alias && alias[0] != '\0') {
2526 my_alias = alias; 2525 my_alias = alias;
2527 } else if((buddy = find_buddy(gc, realwho)) != NULL) { 2526 } else if((buddy = find_buddy(gc, realwho)) != NULL) {
2528 my_alias = buddy->show; 2527 my_alias = buddy->alias;
2529 } 2528 }
2530 2529
2531 /* If there's an alias for the buddy, it's not 0-length 2530 /* If there's an alias for the buddy, it's not 0-length
2532 * and it doesn't match his JID, add the "name" attribute. 2531 * and it doesn't match his JID, add the "name" attribute.
2533 */ 2532 */