aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/yahoo/yahoo.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-10-15 11:31:13 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2006-10-15 11:31:13 +0200
commite97827bee83d3a0663aa284e72a4f6c84b4b4dfe (patch)
tree38fcda3162027d741598536c28a2c0cd4c3f52c6 /protocols/yahoo/yahoo.c
parent3ef6410bab141e5c6ea465730a37289991c38f9f (diff)
parent695e39232324711816f1db8e25fdba59a0c6456f (diff)
Merging from devel.
Diffstat (limited to 'protocols/yahoo/yahoo.c')
-rw-r--r--protocols/yahoo/yahoo.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c
index 23c6f813..6f286196 100644
--- a/protocols/yahoo/yahoo.c
+++ b/protocols/yahoo/yahoo.c
@@ -191,13 +191,18 @@ static void byahoo_set_away( struct gaim_connection *gc, char *state, char *msg
gc->away = NULL;
- if( msg )
+ if( state && msg && g_strcasecmp( state, msg ) != 0 )
{
yd->current_status = YAHOO_STATUS_CUSTOM;
gc->away = "";
}
- if( state )
+ else if( state )
{
+ /* Set msg to NULL since (if it isn't NULL already) it's equal
+ to state. msg must be empty if we want to use an existing
+ away state. */
+ msg = NULL;
+
gc->away = "";
if( g_strcasecmp( state, "Available" ) == 0 )
{
@@ -234,10 +239,7 @@ static void byahoo_set_away( struct gaim_connection *gc, char *state, char *msg
else
yd->current_status = YAHOO_STATUS_AVAILABLE;
- if( yd->current_status == YAHOO_STATUS_INVISIBLE )
- yahoo_set_away( yd->y2_id, yd->current_status, NULL, gc->away != NULL );
- else
- yahoo_set_away( yd->y2_id, yd->current_status, msg, gc->away != NULL );
+ yahoo_set_away( yd->y2_id, yd->current_status, msg, gc->away != NULL );
}
static GList *byahoo_away_states( struct gaim_connection *gc )