aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2007-11-14 23:29:43 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2007-11-14 23:29:43 +0000
commita6df0b5d21370549328c7929a008abb68f2ed4db (patch)
tree4de1cd256776e404c6cda7d4f3a5e783aa7c2038
parenteda54e40d04c83028d84e91c895a550c1929b436 (diff)
Added "xmlconsole" setting so it can be enabled at login time already.
-rw-r--r--doc/user-guide/commands.xml13
-rw-r--r--protocols/jabber/jabber.c11
2 files changed, 24 insertions, 0 deletions
diff --git a/doc/user-guide/commands.xml b/doc/user-guide/commands.xml
index cf40782f..8f97558f 100644
--- a/doc/user-guide/commands.xml
+++ b/doc/user-guide/commands.xml
@@ -680,6 +680,19 @@
</description>
</bitlbee-setting>
+ <bitlbee-setting name="xmlconsole" type="boolean" scope="account">
+ <default>false</default>
+
+ <description>
+ <para>
+ The Jabber module allows you to add a buddy <emphasis>xmlconsole</emphasis> to your contact list, which will then show you the raw XMPP stream between you and the server. You can also send XMPP packets to this buddy, which will then be sent to the server.
+ </para>
+ <para>
+ If you want to enable this XML console permanently (and at login time already), you can set this setting.
+ </para>
+ </description>
+ </bitlbee-setting>
+
<bitlbee-command name="rename">
<short-description>Rename (renick) a buddy</short-description>
<syntax>rename &lt;oldnick&gt; &lt;newnick&gt;</syntax>
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index 9176cd68..ab26efc9 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -54,6 +54,9 @@ 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, "xmlconsole", "false", set_eval_bool, acc );
+ s->flags |= ACC_SET_OFFLINE_ONLY;
}
static void jabber_login( account_t *acc )
@@ -188,6 +191,14 @@ static void jabber_login( account_t *acc )
imcb_error( ic, "Could not connect to server" );
imc_logout( ic, TRUE );
}
+
+ if( set_getbool( &acc->set, "xmlconsole" ) )
+ {
+ jd->flags |= JFLAG_XMLCONSOLE;
+ /* Shouldn't really do this at this stage already, maybe. But
+ I think this shouldn't break anything. */
+ imcb_add_buddy( ic, JABBER_XMLCONSOLE_HANDLE, NULL );
+ }
}
static void jabber_logout( struct im_connection *ic )