Mercurial > pidgin
changeset 10747:0e6b33463a3a
[gaim-migrate @ 12349]
This gets rid of that "you tried to set your away message too early"
error message for oscar.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 27 Mar 2005 04:52:55 +0000 |
parents | 1f51dd1a7f87 |
children | 8d19e10c187f |
files | src/protocols/oscar/oscar.c |
diffstat | 1 files changed, 9 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Sun Mar 27 03:58:44 2005 +0000 +++ b/src/protocols/oscar/oscar.c Sun Mar 27 04:52:55 2005 +0000 @@ -5702,8 +5702,6 @@ } g_free(text_html); - - return; } static void @@ -5725,8 +5723,6 @@ status_id = gaim_status_get_id(status); presence = gaim_account_get_presence(account); - gaim_debug_info("oscar", "Setting status to %s\n", status_id); - if (gc) od = (OscarData *)gc->proto_data; @@ -5840,25 +5836,27 @@ else if (!strcmp(status_id, OSCAR_STATUS_ID_CUSTOM)) aim_setextstatus(od->sess, AIM_ICQ_STATE_OUT | AIM_ICQ_STATE_AWAY); - - return; } static void oscar_set_status(GaimAccount *account, GaimStatus *status) { - GaimConnection *gc = gaim_account_get_connection(account); + gboolean connected = gaim_account_is_connected(account); GaimStatusType *type = gaim_status_get_type(status); int primitive = gaim_status_type_get_primitive(type); + gaim_debug_info("oscar", "Set status to %s\n", gaim_status_get_name(status)); + if (!gaim_status_is_active(status)) return; - if (primitive == !GAIM_STATUS_OFFLINE && !gc) { + if (primitive == !GAIM_STATUS_OFFLINE && !connected) { gaim_account_connect(account); - } else if (primitive == GAIM_STATUS_OFFLINE && gc) { + } else if (primitive == GAIM_STATUS_OFFLINE && connected) { gaim_account_disconnect(account); } else { + if (!connected) + return; if (aim_sn_is_icq(gaim_account_get_username(account))) oscar_set_status_icq(account, status); @@ -5866,7 +5864,6 @@ /* QQQ - Should probably also set this for ICQ */ oscar_set_status_aim(account, status); } - return; } static void @@ -5875,7 +5872,8 @@ aim_im_warn(od->sess, od->conn, name, anonymous ? AIM_WARN_ANON : 0); } -static void oscar_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) { +static void +oscar_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) { OscarData *od = (OscarData *)gc->proto_data; if (!aim_snvalid(buddy->name)) {