diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-06 18:19:31 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-06 18:19:31 +0000 |
commit | be915f54a52dd0f88b2a64d5cef094b0e6c9334d (patch) | |
tree | 7693394c6fcc2f0d9cf2c4a9c92395d727ae1489 /protocols/yahoo/yahoo.c | |
parent | 0714d51217d999fc67b6ef193e04f7af437cc2b0 (diff) |
Yahoo! fixes. Turns out the protocol really is somewhat odd.
Diffstat (limited to 'protocols/yahoo/yahoo.c')
-rw-r--r-- | protocols/yahoo/yahoo.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 78a8eb8a..a47de966 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -199,8 +199,10 @@ static void byahoo_set_away( struct im_connection *ic, char *state, char *msg ) { struct byahoo_data *yd = (struct byahoo_data *) ic->proto_data; - if( state ) + if( state && msg == NULL ) { + /* Use these states only if msg doesn't contain additional + info since away messages are only supported with CUSTOM. */ if( g_strcasecmp( state, "Be Right Back" ) == 0 ) yd->current_status = YAHOO_STATUS_BRB; else if( g_strcasecmp( state, "Busy" ) == 0 ) @@ -224,6 +226,8 @@ static void byahoo_set_away( struct im_connection *ic, char *state, char *msg ) else yd->current_status = YAHOO_STATUS_CUSTOM; } + else if( state ) + yd->current_status = YAHOO_STATUS_CUSTOM; else yd->current_status = YAHOO_STATUS_AVAILABLE; |