Changeset 0ebf919


Ignore:
Timestamp:
2010-08-21T22:25:37Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
c00dd71
Parents:
a758ec1
Message:

Pass "user is mobile" info coming from OSCAR up to BitlBee and show mobile
people as away=Mobile. Bug #462 (and others for other protocols).

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • doc/user-guide/commands.xml

    ra758ec1 r0ebf919  
    829829        </bitlbee-setting>
    830830
     831        <bitlbee-setting name="mobile_is_away" type="boolean" scope="global">
     832                <default>false</default>
     833
     834                <description>
     835                        <para>
     836                                Most IM networks have a mobile version of their client. People who use these may not be paying that much attention to messages coming in. By enabling this setting, people using mobile clients will always be shown as away.
     837                        </para>
     838                </description>
     839
     840        </bitlbee-setting>
     841
    831842        <bitlbee-setting name="nick" type="string" scope="chat">
    832843                <description>
  • protocols/bee.c

    ra758ec1 r0ebf919  
    4040        s = set_add( &b->set, "auto_reconnect_delay", "5*3<900", set_eval_account_reconnect_delay, b );
    4141        s = set_add( &b->set, "debug", "false", set_eval_bool, b );
     42        s = set_add( &b->set, "mobile_is_away", "false", set_eval_bool, b );
    4243        s = set_add( &b->set, "save_on_quit", "true", set_eval_bool, b );
    4344        s = set_add( &b->set, "status", NULL, set_eval_away_status, b );
  • protocols/bee.h

    ra758ec1 r0ebf919  
    5656void bee_free( bee_t *b );
    5757
     58/* TODO(wilmer): Kill at least the OPT_ flags that have an equivalent here. */
    5859typedef enum
    5960{
    6061        BEE_USER_ONLINE = 1,    /* Compatibility with old OPT_LOGGED_IN flag */
    6162        BEE_USER_AWAY = 4,      /* Compatibility with old OPT_AWAY flag */
     63        BEE_USER_MOBILE = 8,    /* Compatibility with old OPT_MOBILE flag */
    6264        BEE_USER_LOCAL = 256,   /* Locally-added contacts (not in real contact list) */
    6365} bee_user_flags_t;
  • protocols/bee_user.c

    ra758ec1 r0ebf919  
    190190        bu->status_msg = g_strdup( message );
    191191       
     192        if( bu->status == NULL && ( flags & OPT_MOBILE ) &&
     193            set_getbool( &bee->set, "mobile_is_away" ) )
     194        {
     195                bu->flags |= BEE_USER_AWAY;
     196                bu->status = g_strdup( "Mobile" );
     197        }
     198       
    192199        if( bee->ui->user_status )
    193200                bee->ui->user_status( bee, bu, old );
  • protocols/nogaim.h

    ra758ec1 r0ebf919  
    6363#define OPT_LOGGING_OUT 0x00000002
    6464#define OPT_AWAY        0x00000004
     65#define OPT_MOBILE      0x00000008
    6566#define OPT_DOES_HTML   0x00000010
    6667#define OPT_LOCALBUDDY  0x00000020 /* For nicks local to one groupchat */
  • protocols/oscar/oscar.c

    ra758ec1 r0ebf919  
    898898                        flags |= OPT_AWAY;
    899899        }
     900       
     901        /* Maybe this should be done just for AIM contacts, not sure. */
     902        if (info->flags & AIM_FLAG_WIRELESS)
     903                flags |= OPT_MOBILE;
    900904       
    901905        if (info->present & AIM_USERINFO_PRESENT_ICQEXTSTATUS) {
Note: See TracChangeset for help on using the changeset viewer.