aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/user-guide/commands.xml14
-rw-r--r--protocols/jabber/iq.c4
-rw-r--r--protocols/jabber/jabber.c2
3 files changed, 18 insertions, 2 deletions
diff --git a/doc/user-guide/commands.xml b/doc/user-guide/commands.xml
index 15ed4c34..e85dadf4 100644
--- a/doc/user-guide/commands.xml
+++ b/doc/user-guide/commands.xml
@@ -1005,6 +1005,20 @@
</description>
</bitlbee-setting>
+ <bitlbee-setting name="user_agent" type="string" scope="account">
+ <default>BitlBee</default>
+
+ <description>
+ <para>
+ Some Jabber servers are configured to only allow a few (or even just one) kinds of XMPP clients to connect to them.
+ </para>
+
+ <para>
+ You can change this setting to make BitlBee present itself as a different client, so that you can still connect to these servers.
+ </para>
+ </description>
+ </bitlbee-setting>
+
<bitlbee-setting name="web_aware" type="string" scope="account">
<default>false</default>
diff --git a/protocols/jabber/iq.c b/protocols/jabber/iq.c
index 95b21e1e..68777b0b 100644
--- a/protocols/jabber/iq.c
+++ b/protocols/jabber/iq.c
@@ -64,7 +64,7 @@ xt_status jabber_pkt_iq( struct xt_node *node, gpointer data )
/* Of course this is a very essential query to support. ;-) */
if( strcmp( s, XMLNS_VERSION ) == 0 )
{
- xt_add_child( reply, xt_new_node( "name", "BitlBee", NULL ) );
+ xt_add_child( reply, xt_new_node( "name", set_getstr( &ic->acc->set, "user_agent" ), NULL ) );
xt_add_child( reply, xt_new_node( "version", BITLBEE_VERSION, NULL ) );
xt_add_child( reply, xt_new_node( "os", ARCH, NULL ) );
}
@@ -104,7 +104,7 @@ xt_status jabber_pkt_iq( struct xt_node *node, gpointer data )
c = xt_new_node( "identity", NULL, NULL );
xt_add_attr( c, "category", "client" );
xt_add_attr( c, "type", "pc" );
- xt_add_attr( c, "name", "BitlBee" );
+ xt_add_attr( c, "name", set_getstr( &ic->acc->set, "user_agent" ) );
xt_add_child( reply, c );
for( f = features; *f; f ++ )
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index 8bb44691..48b8ac43 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -79,6 +79,8 @@ static void jabber_init( account_t *acc )
s = set_add( &acc->set, "tls", "try", set_eval_tls, acc );
s->flags |= ACC_SET_OFFLINE_ONLY;
+ s = set_add( &acc->set, "user_agent", "BitlBee", NULL, acc );
+
s = set_add( &acc->set, "xmlconsole", "false", set_eval_bool, acc );
s->flags |= ACC_SET_OFFLINE_ONLY;