comparison libgaim/server.c @ 14496:aee74d84816c

[gaim-migrate @ 17215] The changes I committed earlier, from a patch from wabz, resulted in notices in an AIM conversation that the buddy had changed the alias to (null). After looking at the code, I believe the old code was wrong, but maybe it's me that's wrong. In any case, I think this will clear things up. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Sun, 10 Sep 2006 07:02:23 +0000
parents 1f81919515ae
children f23506e8f812
comparison
equal deleted inserted replaced
14495:c804f41d61ae 14496:aee74d84816c
213 GaimConversation *conv; 213 GaimConversation *conv;
214 214
215 for (buds = buddies; buds; buds = buds->next) 215 for (buds = buddies; buds; buds = buds->next)
216 { 216 {
217 b = buds->data; 217 b = buds->data;
218 if (b->server_alias && !strcmp(b->server_alias, alias)) 218 if ((b->server_alias == NULL && alias == NULL) ||
219 (b->server_alias && alias && !strcmp(b->server_alias, alias)))
220 {
219 continue; 221 continue;
222 }
220 gaim_blist_server_alias_buddy(b, alias); 223 gaim_blist_server_alias_buddy(b, alias);
221 224
222 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, b->name, account); 225 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, b->name, account);
223 226
224 if (conv != NULL) 227 if (conv != NULL && alias != NULL)
225 { 228 {
226 char *tmp = g_strdup_printf(_("%s is now known as %s.\n"), 229 char *tmp = g_strdup_printf(_("%s is now known as %s.\n"),
227 who, alias); 230 who, alias);
228 231
229 gaim_conversation_write(conv, NULL, tmp, GAIM_MESSAGE_SYSTEM, 232 gaim_conversation_write(conv, NULL, tmp, GAIM_MESSAGE_SYSTEM,