# HG changeset patch # User Sean Egan # Date 1170565119 0 # Node ID 91f33cf0a3e76e6793efc68e7aec41f03b947c72 # Parent 2193394fd427b0b5ed95355df86279056d680b9f# Parent cb0750152bf6770af80ad3ee008cef64e89e9e0e merge of '650236458e73bfde2553d41dbb4797e1cf53974c' and 'ed910c313d1d1832866e5ef7ce03cc354973bc55' diff -r cb0750152bf6 -r 91f33cf0a3e7 libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Sun Feb 04 04:47:06 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Sun Feb 04 04:58:39 2007 +0000 @@ -176,6 +176,11 @@ gaim_prpl_got_user_idle(gaim_connection_get_account(gc), name, TRUE, f->idle); else gaim_prpl_got_user_idle(gaim_connection_get_account(gc), name, FALSE, 0); + + if (f->sms) + gaim_prpl_got_user_status(gaim_connection_get_account(gc), name, YAHOO_STATUS_TYPE_MOBILE, NULL); + else + gaim_prpl_got_user_status_deactive(gaim_connection_get_account(gc), name, YAHOO_STATUS_TYPE_MOBILE); } static void yahoo_process_status(GaimConnection *gc, struct yahoo_packet *pkt) @@ -300,8 +305,10 @@ if (strtol(pair->value, NULL, 10) == 0) { if (f) f->status = YAHOO_STATUS_OFFLINE; - if (name) + if (name) { gaim_prpl_got_user_status(account, name, "offline", NULL); + gaim_prpl_got_user_status_deactive(account, name, YAHOO_STATUS_TYPE_MOBILE); + } break; } break; @@ -2821,8 +2828,6 @@ presence = gaim_buddy_get_presence(b); if (gaim_presence_is_online(presence)) { - if (f->sms) - return "mobile"; if (yahoo_friend_get_game(f)) return "game"; if (f->protocol == 2) @@ -3473,6 +3478,9 @@ type = gaim_status_type_new(GAIM_STATUS_OFFLINE, YAHOO_STATUS_TYPE_OFFLINE, NULL, TRUE); types = g_list_append(types, type); + type = gaim_status_type_new_full(GAIM_STATUS_MOBILE, YAHOO_STATUS_TYPE_MOBILE, NULL, FALSE, FALSE, TRUE); + types = g_list_append(types, type); + return types; } diff -r cb0750152bf6 -r 91f33cf0a3e7 libpurple/protocols/yahoo/yahoo.h --- a/libpurple/protocols/yahoo/yahoo.h Sun Feb 04 04:47:06 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.h Sun Feb 04 04:58:39 2007 +0000 @@ -66,6 +66,7 @@ #define YAHOO_STATUS_TYPE_STEPPEDOUT "steppedout" #define YAHOO_STATUS_TYPE_AWAY "away" #define YAHOO_STATUS_TYPE_INVISIBLE "invisible" +#define YAHOO_STATUS_TYPE_MOBILE "mobile" enum yahoo_status { YAHOO_STATUS_AVAILABLE = 0,