Mercurial > pidgin
comparison src/server.c @ 8870:9e33e1fa6c97
[gaim-migrate @ 9638]
credit to shx for discovering this bug, and credit to the rest of us for not seeing it in the past 3 1/2 years
committer: Tailor Script <tailor@pidgin.im>
| author | Nathan Walp <nwalp@pidgin.im> |
|---|---|
| date | Tue, 04 May 2004 15:34:02 +0000 |
| parents | ddd2bf87fe8d |
| children | b8c0a53b3022 |
comparison
equal
deleted
inserted
replaced
| 8869:ab5a46dd132a | 8870:9e33e1fa6c97 |
|---|---|
| 449 | 449 |
| 450 if (prpl_info && g_list_find(gaim_connections_get_all(), g) && prpl_info->add_buddy) | 450 if (prpl_info && g_list_find(gaim_connections_get_all(), g) && prpl_info->add_buddy) |
| 451 prpl_info->add_buddy(g, name, group); | 451 prpl_info->add_buddy(g, name, group); |
| 452 } | 452 } |
| 453 | 453 |
| 454 void serv_add_buddies(GaimConnection *g, GList *buddies) | 454 void serv_add_buddies(GaimConnection *gc, GList *buddies) |
| 455 { | 455 { |
| 456 GaimPluginProtocolInfo *prpl_info = NULL; | 456 GaimPluginProtocolInfo *prpl_info = NULL; |
| 457 | 457 |
| 458 if (g != NULL && g->prpl != NULL) | 458 if (gc != NULL && gc->prpl != NULL) |
| 459 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(g->prpl); | 459 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); |
| 460 | 460 |
| 461 if (prpl_info && g_list_find(gaim_connections_get_all(), g)) { | 461 if (prpl_info && g_list_find(gaim_connections_get_all(), gc)) { |
| 462 if (prpl_info->add_buddies) | 462 if (prpl_info->add_buddies) |
| 463 prpl_info->add_buddies(g, buddies); | 463 prpl_info->add_buddies(gc, buddies); |
| 464 else if (prpl_info->add_buddy) { | 464 else if (prpl_info->add_buddy) { |
| 465 while (buddies) { | 465 while (buddies) { |
| 466 prpl_info->add_buddy(g, buddies->data, NULL); | 466 GaimBuddy *b = buddies->data; |
| 467 prpl_info->add_buddy(gc, b->name, gaim_find_buddys_group(b)); | |
| 467 buddies = buddies->next; | 468 buddies = buddies->next; |
| 468 } | 469 } |
| 469 } | 470 } |
| 470 } | 471 } |
| 471 } | 472 } |
| 534 prpl_info->alias_buddy(b->account->gc, b->name, b->alias); | 535 prpl_info->alias_buddy(b->account->gc, b->name, b->alias); |
| 535 } | 536 } |
| 536 } | 537 } |
| 537 | 538 |
| 538 void serv_got_alias(GaimConnection *gc, const char *who, const char *alias) { | 539 void serv_got_alias(GaimConnection *gc, const char *who, const char *alias) { |
| 539 GaimBuddy *b = gaim_find_buddy(gc->account, who); | 540 GSList *buds, *buddies = gaim_find_buddies(gc->account, who); |
| 540 | 541 GaimBuddy *b; |
| 541 if(!b) | 542 |
| 542 return; | 543 for(buds = buddies; buds; buds = buds->next) { |
| 543 | 544 b = buds->data; |
| 544 gaim_blist_server_alias_buddy(b, alias); | 545 gaim_blist_server_alias_buddy(b, alias); |
| 546 } | |
| 545 } | 547 } |
| 546 | 548 |
| 547 /* | 549 /* |
| 548 * Move a buddy from one group to another on server. | 550 * Move a buddy from one group to another on server. |
| 549 * | 551 * |
