Mercurial > pidgin.yaz
changeset 15525:2193394fd427
Yahoo mobile status
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 04 Feb 2007 04:58:33 +0000 |
parents | 84b3ab83df35 |
children | 91f33cf0a3e7 |
files | libpurple/protocols/yahoo/yahoo.c libpurple/protocols/yahoo/yahoo.h |
diffstat | 2 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo.c Sun Feb 04 02:31:04 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Sun Feb 04 04:58:33 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; }
--- a/libpurple/protocols/yahoo/yahoo.h Sun Feb 04 02:31:04 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.h Sun Feb 04 04:58:33 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,