Mercurial > pidgin
comparison src/connection.c @ 10052:eaec201b2688
[gaim-migrate @ 11013]
More rockin status stuff from Dave West!
Things are beginning to shape up quite well.
Dave, again, sorry it took me a week to get to this. Girl waits for no man.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Sun, 19 Sep 2004 21:19:55 +0000 |
| parents | e4a27c9aec4c |
| children | 17dcff7a5c77 |
comparison
equal
deleted
inserted
replaced
| 10051:0810288958ad | 10052:eaec201b2688 |
|---|---|
| 211 void | 211 void |
| 212 gaim_connection_disconnect(GaimConnection *gc) | 212 gaim_connection_disconnect(GaimConnection *gc) |
| 213 { | 213 { |
| 214 GaimAccount *account; | 214 GaimAccount *account; |
| 215 GList *wins; | 215 GList *wins; |
| 216 GaimPresence *presence = NULL; | |
| 216 | 217 |
| 217 g_return_if_fail(gc != NULL); | 218 g_return_if_fail(gc != NULL); |
| 218 | 219 |
| 219 account = gaim_connection_get_account(gc); | 220 account = gaim_connection_get_account(gc); |
| 220 | 221 |
| 240 | 241 |
| 241 /* LOG system_log(log_signoff, gc, NULL, | 242 /* LOG system_log(log_signoff, gc, NULL, |
| 242 OPT_LOG_BUDDY_SIGNON | OPT_LOG_MY_SIGNON); */ | 243 OPT_LOG_BUDDY_SIGNON | OPT_LOG_MY_SIGNON); */ |
| 243 gaim_signal_emit(gaim_connections_get_handle(), "signed-off", gc); | 244 gaim_signal_emit(gaim_connections_get_handle(), "signed-off", gc); |
| 244 | 245 |
| 246 presence = gaim_account_get_presence(account); | |
| 247 if (gaim_presence_is_online(presence) == TRUE) | |
| 248 gaim_presence_set_status_active(presence, "offline", TRUE); | |
| 245 | 249 |
| 246 /* | 250 /* |
| 247 * XXX This is a hack! Remove this and replace it with a better event | 251 * XXX This is a hack! Remove this and replace it with a better event |
| 248 * notification system. | 252 * notification system. |
| 249 */ | 253 */ |
| 311 | 315 |
| 312 if (gc->state == GAIM_CONNECTED) { | 316 if (gc->state == GAIM_CONNECTED) { |
| 313 GaimBlistNode *gnode,*cnode,*bnode; | 317 GaimBlistNode *gnode,*cnode,*bnode; |
| 314 GList *wins; | 318 GList *wins; |
| 315 GList *add_buds = NULL; | 319 GList *add_buds = NULL; |
| 316 GaimAccount *account = gaim_connection_get_account(gc); | 320 GaimAccount *account; |
| 321 GaimPresence *presence; | |
| 322 | |
| 323 account = gaim_connection_get_account(gc); | |
| 324 presence = gaim_account_get_presence(account); | |
| 317 | 325 |
| 318 /* Set the time the account came online */ | 326 /* Set the time the account came online */ |
| 319 time(&gc->login_time); | 327 time(&gc->login_time); |
| 320 | 328 |
| 321 if (ops != NULL && ops->connected != NULL) | 329 if (ops != NULL && ops->connected != NULL) |
| 347 g_free(msg); | 355 g_free(msg); |
| 348 } | 356 } |
| 349 | 357 |
| 350 gaim_signal_emit(gaim_connections_get_handle(), "signed-on", gc); | 358 gaim_signal_emit(gaim_connections_get_handle(), "signed-on", gc); |
| 351 | 359 |
| 352 #if 0 | 360 /* XXX - STATUS - Need to handle away at login here. */ |
| 353 /* away option given? */ | 361 if (gaim_presence_is_online(presence) == FALSE) |
| 354 if (opt_away) { | 362 gaim_presence_set_status_active(presence, "online", TRUE); |
| 355 away_on_login(opt_away_arg); | |
| 356 /* don't do it again */ | |
| 357 opt_away = 0; | |
| 358 } else if (awaymessage) { | |
| 359 serv_set_away(gc, GAIM_AWAY_CUSTOM, awaymessage->message); | |
| 360 } | |
| 361 if (opt_away_arg != NULL) { | |
| 362 g_free(opt_away_arg); | |
| 363 opt_away_arg = NULL; | |
| 364 } | |
| 365 #endif | |
| 366 | 363 |
| 367 /* let the prpl know what buddies we pulled out of the local list */ | 364 /* let the prpl know what buddies we pulled out of the local list */ |
| 368 for (gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) { | 365 for (gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) { |
| 369 if(!GAIM_BLIST_NODE_IS_GROUP(gnode)) | 366 if(!GAIM_BLIST_NODE_IS_GROUP(gnode)) |
| 370 continue; | 367 continue; |
