comparison src/connection.c @ 10869:3e43c132f151

[gaim-migrate @ 12556] We no longer call "serv_add_buddies" at log in. Any PRPL that relied on that should look through the buddy list itself and do whatever it needs to after calling gaim_connection_set_state(gc, GAIM_CONNECTED); committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 25 Apr 2005 03:55:11 +0000
parents a9d989c84609
children 50224ac8184d
comparison
equal deleted inserted replaced
10868:4a56b48dbaa6 10869:3e43c132f151
263 else { 263 else {
264 connections_connecting = g_list_remove(connections_connecting, gc); 264 connections_connecting = g_list_remove(connections_connecting, gc);
265 } 265 }
266 266
267 if (gc->state == GAIM_CONNECTED) { 267 if (gc->state == GAIM_CONNECTED) {
268 GaimBlistNode *gnode,*cnode,*bnode;
269 #if 0 268 #if 0
270 GList *wins; 269 GList *wins;
271 #endif 270 #endif
272 GList *add_buds = NULL;
273 GaimAccount *account; 271 GaimAccount *account;
274 GaimPresence *presence; 272 GaimPresence *presence;
275 273
276 account = gaim_connection_get_account(gc); 274 account = gaim_connection_get_account(gc);
277 presence = gaim_account_get_presence(account); 275 presence = gaim_account_get_presence(account);
309 GAIM_CONV_ACCOUNT_ONLINE); 307 GAIM_CONV_ACCOUNT_ONLINE);
310 } 308 }
311 #endif 309 #endif
312 gaim_signal_emit(gaim_connections_get_handle(), "signed-on", gc); 310 gaim_signal_emit(gaim_connections_get_handle(), "signed-on", gc);
313 311
314 /* let the prpl know what buddies we pulled out of the local list */
315 /* XXX - Remove this and let the prpl take care of it itself? */
316 for (gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) {
317 if(!GAIM_BLIST_NODE_IS_GROUP(gnode))
318 continue;
319 for(cnode = gnode->child; cnode; cnode = cnode->next) {
320 if(!GAIM_BLIST_NODE_IS_CONTACT(cnode))
321 continue;
322 for(bnode = cnode->child; bnode; bnode = bnode->next) {
323 GaimBuddy *b;
324 if(!GAIM_BLIST_NODE_IS_BUDDY(bnode))
325 continue;
326
327 b = (GaimBuddy *)bnode;
328 if(b->account == gc->account) {
329 add_buds = g_list_append(add_buds, b);
330 }
331 }
332 }
333 }
334
335 if(add_buds) {
336 serv_add_buddies(gc, add_buds);
337 g_list_free(add_buds);
338 }
339
340 serv_set_permit_deny(gc); 312 serv_set_permit_deny(gc);
341 313
342 update_keepalive(gc, TRUE); 314 update_keepalive(gc, TRUE);
343 315
344 if (gaim_account_get_user_info(account) != NULL) 316 if (gaim_account_get_user_info(account) != NULL)