Mercurial > pidgin.yaz
comparison src/protocols/oscar/oscar.c @ 11718:11e95968c9ff
[gaim-migrate @ 14009]
PRPLs are no longer required to call gaim_account_connect() and
gaim_account_disconnect()--it is done in the core. Having the PRPLs
do it was kind of silly. And this should allow me to improve the
auto-reconnect plugin some. I think.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 22 Oct 2005 20:09:24 +0000 |
parents | 9f3129911c95 |
children | fa78d6b8ec7d |
comparison
equal
deleted
inserted
replaced
11717:84d1145522c2 | 11718:11e95968c9ff |
---|---|
6651 } | 6651 } |
6652 | 6652 |
6653 static void | 6653 static void |
6654 oscar_set_status(GaimAccount *account, GaimStatus *status) | 6654 oscar_set_status(GaimAccount *account, GaimStatus *status) |
6655 { | 6655 { |
6656 gboolean disconnected = gaim_account_is_disconnected(account); | |
6657 GaimStatusType *type = gaim_status_get_type(status); | |
6658 int primitive = gaim_status_type_get_primitive(type); | |
6659 | |
6660 gaim_debug_info("oscar", "Set status to %s\n", gaim_status_get_name(status)); | 6656 gaim_debug_info("oscar", "Set status to %s\n", gaim_status_get_name(status)); |
6661 | 6657 |
6662 if (!gaim_status_is_active(status)) | 6658 if (!gaim_status_is_active(status)) |
6663 return; | 6659 return; |
6664 | 6660 |
6665 if (primitive != GAIM_STATUS_OFFLINE && disconnected) { | 6661 if (!gaim_account_is_connected(account)) |
6666 gaim_account_connect(account); | 6662 return; |
6667 } else if (primitive == GAIM_STATUS_OFFLINE && !disconnected) { | 6663 |
6668 gaim_account_disconnect(account); | 6664 if (aim_sn_is_icq(gaim_account_get_username(account))) |
6669 } else { | 6665 oscar_set_status_icq(account, status); |
6670 if (!gaim_account_is_connected(account)) | 6666 else |
6671 return; | 6667 /* QQQ - Should probably also set this for ICQ */ |
6672 | 6668 oscar_set_status_aim(account, status); |
6673 if (aim_sn_is_icq(gaim_account_get_username(account))) | |
6674 oscar_set_status_icq(account, status); | |
6675 else | |
6676 /* QQQ - Should probably also set this for ICQ */ | |
6677 oscar_set_status_aim(account, status); | |
6678 } | |
6679 } | 6669 } |
6680 | 6670 |
6681 #ifdef CRAZY_WARN | 6671 #ifdef CRAZY_WARN |
6682 static void | 6672 static void |
6683 oscar_warn(GaimConnection *gc, const char *name, gboolean anonymous) { | 6673 oscar_warn(GaimConnection *gc, const char *name, gboolean anonymous) { |