comparison src/server.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 511c2b63caa4
children ff0642fab1d5
comparison
equal deleted inserted replaced
4226:a7d1eddc0afc 4227:a614423c648f
338 if(b && b->gc && b->gc->prpl && b->gc->prpl->alias_buddy) { 338 if(b && b->gc && b->gc->prpl && b->gc->prpl->alias_buddy) {
339 b->gc->prpl->alias_buddy(b->gc, b->name); 339 b->gc->prpl->alias_buddy(b->gc, b->name);
340 } 340 }
341 } 341 }
342 342
343 void serv_got_alias(struct gaim_connection *gc, char *who, char *alias) {
344 struct buddy *b = find_buddy(gc, who);
345 if(!b)
346 return;
347
348 if(alias)
349 g_snprintf(b->server_alias, sizeof(b->server_alias), "%s", alias);
350 else
351 b->server_alias[0] = '\0';
352
353 handle_buddy_rename(b, b->name);
354 }
355
343 /* 356 /*
344 * Move a buddy from one group to another on server. 357 * Move a buddy from one group to another on server.
345 * 358 *
346 * Note: For now we'll not deal with changing gc's at the same time, but 359 * Note: For now we'll not deal with changing gc's at the same time, but
347 * it should be possible. Probably needs to be done, someday. 360 * it should be possible. Probably needs to be done, someday.
610 * and different things we have to do for each. */ 623 * and different things we have to do for each. */
611 if (gc->away) { 624 if (gc->away) {
612 time_t t; 625 time_t t;
613 char *tmpmsg; 626 char *tmpmsg;
614 struct buddy *b = find_buddy(gc, name); 627 struct buddy *b = find_buddy(gc, name);
615 char *alias = b ? b->show : name; 628 char *alias = b ? get_buddy_alias(b) : name;
616 int row; 629 int row;
617 struct queued_away_response *qar; 630 struct queued_away_response *qar;
618 631
619 time(&t); 632 time(&t);
620 633