Mercurial > pidgin
comparison src/server.c @ 6787:faa491042c66
[gaim-migrate @ 7326]
the add_buddy prpl op now takes a group. It's horribly inconsistent with
the rest. This stuff all needs to be updated. Maybe I'll replace it in
0.70cvs.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Sun, 07 Sep 2003 23:47:00 +0000 |
| parents | 0c5637b5462e |
| children | f098765ac919 |
comparison
equal
deleted
inserted
replaced
| 6786:8efafdc38718 | 6787:faa491042c66 |
|---|---|
| 155 gc->idle_timer = g_timeout_add(20000, check_idle, gc); | 155 gc->idle_timer = g_timeout_add(20000, check_idle, gc); |
| 156 serv_touch_idle(gc); | 156 serv_touch_idle(gc); |
| 157 | 157 |
| 158 if (prpl_info->options & OPT_PROTO_CORRECT_TIME) | 158 if (prpl_info->options & OPT_PROTO_CORRECT_TIME) |
| 159 serv_add_buddy(gc, | 159 serv_add_buddy(gc, |
| 160 gaim_account_get_username(gaim_connection_get_account(gc))); | 160 gaim_account_get_username(gaim_connection_get_account(gc)), |
| 161 NULL); | |
| 161 | 162 |
| 162 update_keepalive(gc, TRUE); | 163 update_keepalive(gc, TRUE); |
| 163 } | 164 } |
| 164 | 165 |
| 165 /* This should return the elapsed time in seconds in which Gaim will not send | 166 /* This should return the elapsed time in seconds in which Gaim will not send |
| 446 | 447 |
| 447 if (prpl_info && g_list_find(gaim_connections_get_all(), g) && prpl_info->change_passwd) | 448 if (prpl_info && g_list_find(gaim_connections_get_all(), g) && prpl_info->change_passwd) |
| 448 prpl_info->change_passwd(g, orig, new); | 449 prpl_info->change_passwd(g, orig, new); |
| 449 } | 450 } |
| 450 | 451 |
| 451 void serv_add_buddy(GaimConnection *g, const char *name) | 452 void serv_add_buddy(GaimConnection *g, const char *name, GaimGroup *group) |
| 452 { | 453 { |
| 453 GaimPluginProtocolInfo *prpl_info = NULL; | 454 GaimPluginProtocolInfo *prpl_info = NULL; |
| 454 | 455 |
| 455 if (g != NULL && g->prpl != NULL) | 456 if (g != NULL && g->prpl != NULL) |
| 456 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(g->prpl); | 457 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(g->prpl); |
| 457 | 458 |
| 458 if (prpl_info && g_list_find(gaim_connections_get_all(), g) && prpl_info->add_buddy) | 459 if (prpl_info && g_list_find(gaim_connections_get_all(), g) && prpl_info->add_buddy) |
| 459 prpl_info->add_buddy(g, name); | 460 prpl_info->add_buddy(g, name, group); |
| 460 } | 461 } |
| 461 | 462 |
| 462 void serv_add_buddies(GaimConnection *g, GList *buddies) | 463 void serv_add_buddies(GaimConnection *g, GList *buddies) |
| 463 { | 464 { |
| 464 GaimPluginProtocolInfo *prpl_info = NULL; | 465 GaimPluginProtocolInfo *prpl_info = NULL; |
| 469 if (prpl_info && g_list_find(gaim_connections_get_all(), g)) { | 470 if (prpl_info && g_list_find(gaim_connections_get_all(), g)) { |
| 470 if (prpl_info->add_buddies) | 471 if (prpl_info->add_buddies) |
| 471 prpl_info->add_buddies(g, buddies); | 472 prpl_info->add_buddies(g, buddies); |
| 472 else if (prpl_info->add_buddy) { | 473 else if (prpl_info->add_buddy) { |
| 473 while (buddies) { | 474 while (buddies) { |
| 474 prpl_info->add_buddy(g, buddies->data); | 475 prpl_info->add_buddy(g, buddies->data, NULL); |
| 475 buddies = buddies->next; | 476 buddies = buddies->next; |
| 476 } | 477 } |
| 477 } | 478 } |
| 478 } | 479 } |
| 479 } | 480 } |
