Changeset 4eef271


Ignore:
Timestamp:
2010-06-23T00:13:46Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
90ba416
Parents:
04a927c
Message:

Added user_agent setting to Jabber accounts so people can get around
ridiculous user agent restrictions on certain Jabber servers. Obviously
this is pretty simple to detect and break, but it works at least with
Openfire.

Files:
3 edited

Legend:

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

    r04a927c r4eef271  
    10061006        </bitlbee-setting>
    10071007
     1008        <bitlbee-setting name="user_agent" type="string" scope="account">
     1009                <default>BitlBee</default>
     1010
     1011                <description>
     1012                        <para>
     1013                                Some Jabber servers are configured to only allow a few (or even just one) kinds of XMPP clients to connect to them.
     1014                        </para>
     1015                       
     1016                        <para>
     1017                                You can change this setting to make BitlBee present itself as a different client, so that you can still connect to these servers.
     1018                        </para>
     1019                </description>
     1020        </bitlbee-setting>
     1021
    10081022        <bitlbee-setting name="web_aware" type="string" scope="account">
    10091023                <default>false</default>
  • protocols/jabber/iq.c

    r04a927c r4eef271  
    6565                if( strcmp( s, XMLNS_VERSION ) == 0 )
    6666                {
    67                         xt_add_child( reply, xt_new_node( "name", "BitlBee", NULL ) );
     67                        xt_add_child( reply, xt_new_node( "name", set_getstr( &ic->acc->set, "user_agent" ), NULL ) );
    6868                        xt_add_child( reply, xt_new_node( "version", BITLBEE_VERSION, NULL ) );
    6969                        xt_add_child( reply, xt_new_node( "os", ARCH, NULL ) );
     
    105105                        xt_add_attr( c, "category", "client" );
    106106                        xt_add_attr( c, "type", "pc" );
    107                         xt_add_attr( c, "name", "BitlBee" );
     107                        xt_add_attr( c, "name", set_getstr( &ic->acc->set, "user_agent" ) );
    108108                        xt_add_child( reply, c );
    109109                       
  • protocols/jabber/jabber.c

    r04a927c r4eef271  
    7979        s = set_add( &acc->set, "tls", "try", set_eval_tls, acc );
    8080        s->flags |= ACC_SET_OFFLINE_ONLY;
     81       
     82        s = set_add( &acc->set, "user_agent", "BitlBee", NULL, acc );
    8183       
    8284        s = set_add( &acc->set, "xmlconsole", "false", set_eval_bool, acc );
Note: See TracChangeset for help on using the changeset viewer.