Index: protocols/jabber/io.c
===================================================================
--- protocols/jabber/io.c	(revision abbd8ede1eb5eeb9b82e09357e0b38949bc95b8d)
+++ protocols/jabber/io.c	(revision 47d3ac46306965e9db66096eef8c60c8e7985950)
@@ -307,5 +307,5 @@
 		{
 			reply = xt_new_node( "starttls", NULL, NULL );
-			xt_add_attr( reply, "xmlns", "urn:ietf:params:xml:ns:xmpp-tls" );
+			xt_add_attr( reply, "xmlns", XMLNS_TLS );
 			if( !jabber_write_packet( gc, reply ) )
 			{
@@ -355,5 +355,5 @@
 	{
 		reply = xt_new_node( "bind", NULL, xt_new_node( "resource", set_getstr( &gc->acc->set, "resource" ), NULL ) );
-		xt_add_attr( reply, "xmlns", "urn:ietf:params:xml:ns:xmpp-bind" );
+		xt_add_attr( reply, "xmlns", XMLNS_BIND );
 		reply = jabber_make_packet( "iq", "set", NULL, reply );
 		jabber_cache_add( gc, reply, jabber_pkt_bind_sess );
@@ -368,5 +368,5 @@
 	{
 		reply = xt_new_node( "session", NULL, NULL );
-		xt_add_attr( reply, "xmlns", "urn:ietf:params:xml:ns:xmpp-session" );
+		xt_add_attr( reply, "xmlns", XMLNS_SESSION );
 		reply = jabber_make_packet( "iq", "set", NULL, reply );
 		jabber_cache_add( gc, reply, jabber_pkt_bind_sess );
@@ -400,5 +400,5 @@
 	/* Just ignore it when it doesn't seem to be TLS-related (is that at
 	   all possible??). */
-	if( !xmlns || strcmp( xmlns, "urn:ietf:params:xml:ns:xmpp-tls" ) != 0 )
+	if( !xmlns || strcmp( xmlns, XMLNS_TLS ) != 0 )
 		return XT_HANDLED;
 	
@@ -433,5 +433,5 @@
 	{
 		if( !( s = xt_find_attr( c, "xmlns" ) ) ||
-		    strcmp( s, "urn:ietf:params:xml:ns:xmpp-streams" ) != 0 )
+		    strcmp( s, XMLNS_STREAM_ERROR ) != 0 )
 			continue;
 		
Index: protocols/jabber/iq.c
===================================================================
--- protocols/jabber/iq.c	(revision abbd8ede1eb5eeb9b82e09357e0b38949bc95b8d)
+++ protocols/jabber/iq.c	(revision 47d3ac46306965e9db66096eef8c60c8e7985950)
@@ -77,5 +77,5 @@
 		
 		/* Of course this is a very essential query to support. ;-) */
-		if( strcmp( s, "jabber:iq:version" ) == 0 )
+		if( strcmp( s, XMLNS_VERSION ) == 0 )
 		{
 			xt_add_child( reply, xt_new_node( "name", "BitlBee", NULL ) );
@@ -83,5 +83,5 @@
 			xt_add_child( reply, xt_new_node( "os", ARCH, NULL ) );
 		}
-		else if( strcmp( s, "jabber:iq:time" ) == 0 )
+		else if( strcmp( s, XMLNS_TIME ) == 0 )
 		{
 			time_t time_ep;
@@ -97,5 +97,5 @@
 			xt_add_child( reply, xt_new_node( "tz", buf, NULL ) );
 		}
-		else if( strcmp( s, "http://jabber.org/protocol/disco#info" ) == 0 )
+		else if( strcmp( s, XMLNS_DISCOVER ) == 0 )
 		{
 			c = xt_new_node( "identity", NULL, NULL );
@@ -106,13 +106,13 @@
 			
 			c = xt_new_node( "feature", NULL, NULL );
-			xt_add_attr( c, "var", "jabber:iq:version" );
+			xt_add_attr( c, "var", XMLNS_VERSION );
 			xt_add_child( reply, c );
 			
 			c = xt_new_node( "feature", NULL, NULL );
-			xt_add_attr( c, "var", "jabber:iq:time" );
+			xt_add_attr( c, "var", XMLNS_TIME );
 			xt_add_child( reply, c );
 			
 			c = xt_new_node( "feature", NULL, NULL );
-			xt_add_attr( c, "var", "http://jabber.org/protocol/chatstates" );
+			xt_add_attr( c, "var", XMLNS_CHATSTATES );
 			xt_add_child( reply, c );
 			
@@ -136,5 +136,5 @@
 		}
 		
-		if( strcmp( s, "jabber:iq:roster" ) == 0 )
+		if( strcmp( s, XMLNS_ROSTER ) == 0 )
 		{
 			int bare_len = strlen( gc->acc->user );
@@ -198,5 +198,5 @@
 	
 	node = xt_new_node( "query", NULL, xt_new_node( "username", jd->username, NULL ) );
-	xt_add_attr( node, "xmlns", "jabber:iq:auth" );
+	xt_add_attr( node, "xmlns", XMLNS_AUTH );
 	node = jabber_make_packet( "iq", "get", NULL, node );
 	
@@ -218,5 +218,5 @@
 	/* Time to authenticate ourselves! */
 	reply = xt_new_node( "query", NULL, NULL );
-	xt_add_attr( reply, "xmlns", "jabber:iq:auth" );
+	xt_add_attr( reply, "xmlns", XMLNS_AUTH );
 	xt_add_child( reply, xt_new_node( "username", jd->username, NULL ) );
 	xt_add_child( reply, xt_new_node( "resource", set_getstr( &gc->acc->set, "resource" ), NULL ) );
@@ -322,5 +322,5 @@
 	
 	node = xt_new_node( "query", NULL, NULL );
-	xt_add_attr( node, "xmlns", "jabber:iq:roster" );
+	xt_add_attr( node, "xmlns", XMLNS_ROSTER );
 	node = jabber_make_packet( "iq", "get", NULL, node );
 	
@@ -391,5 +391,5 @@
 	
 	node = xt_new_node( "vCard", NULL, NULL );
-	xt_add_attr( node, "xmlns", "vcard-temp" );
+	xt_add_attr( node, "xmlns", XMLNS_VCARD );
 	node = jabber_make_packet( "iq", "get", bare_jid, node );
 	
@@ -536,5 +536,5 @@
 	/* And pack it into a roster-add packet */
 	node = xt_new_node( "query", NULL, node );
-	xt_add_attr( node, "xmlns", "jabber:iq:roster" );
+	xt_add_attr( node, "xmlns", XMLNS_ROSTER );
 	node = jabber_make_packet( "iq", "set", NULL, node );
 	
@@ -557,5 +557,5 @@
 	/* And pack it into a roster-add packet */
 	node = xt_new_node( "query", NULL, node );
-	xt_add_attr( node, "xmlns", "jabber:iq:roster" );
+	xt_add_attr( node, "xmlns", XMLNS_ROSTER );
 	node = jabber_make_packet( "iq", "set", NULL, node );
 	
Index: protocols/jabber/jabber.c
===================================================================
--- protocols/jabber/jabber.c	(revision abbd8ede1eb5eeb9b82e09357e0b38949bc95b8d)
+++ protocols/jabber/jabber.c	(revision 47d3ac46306965e9db66096eef8c60c8e7985950)
@@ -235,5 +235,5 @@
 		   we guess when s/he pressed Enter...). */
 		act = xt_new_node( "active", NULL, NULL );
-		xt_add_attr( act, "xmlns", "http://jabber.org/protocol/chatstates" );
+		xt_add_attr( act, "xmlns", XMLNS_CHATSTATES );
 		xt_add_child( node, act );
 		
@@ -353,5 +353,5 @@
 		
 		node = xt_new_node( type, NULL, NULL );
-		xt_add_attr( node, "xmlns", "http://jabber.org/protocol/chatstates" );
+		xt_add_attr( node, "xmlns", XMLNS_CHATSTATES );
 		node = jabber_make_packet( "message", "chat", bud->full_jid, node );
 		
Index: protocols/jabber/jabber.h
===================================================================
--- protocols/jabber/jabber.h	(revision abbd8ede1eb5eeb9b82e09357e0b38949bc95b8d)
+++ protocols/jabber/jabber.h	(revision 47d3ac46306965e9db66096eef8c60c8e7985950)
@@ -114,4 +114,21 @@
 #define JABBER_CACHED_ID "BeeC"
 
+/* RFC 392[01] stuff */
+#define XMLNS_TLS          "urn:ietf:params:xml:ns:xmpp-tls"
+#define XMLNS_SASL         "urn:ietf:params:xml:ns:xmpp-sasl"
+#define XMLNS_BIND         "urn:ietf:params:xml:ns:xmpp-bind"
+#define XMLNS_SESSION      "urn:ietf:params:xml:ns:xmpp-session"
+#define XMLNS_STANZA_ERROR "urn:ietf:params:xml:ns:xmpp-stanzas"
+#define XMLNS_STREAM_ERROR "urn:ietf:params:xml:ns:xmpp-streams"
+#define XMLNS_ROSTER       "jabber:iq:roster"
+
+/* Some supported extensions/legacy stuff */
+#define XMLNS_AUTH         "jabber:iq:auth"                     /* XEP-0078 */
+#define XMLNS_VERSION      "jabber:iq:version"                  /* XEP-0092 */
+#define XMLNS_TIME         "jabber:iq:time"                     /* XEP-0090 */
+#define XMLNS_VCARD        "vcard-temp"                         /* XEP-0054 */
+#define XMLNS_CHATSTATES   "http://jabber.org/protocol/chatstates"  /* 0085 */
+#define XMLNS_DISCOVER     "http://jabber.org/protocol/disco#info"  /* 0030 */
+
 /* iq.c */
 xt_status jabber_pkt_iq( struct xt_node *node, gpointer data );
Index: protocols/jabber/jabber_util.c
===================================================================
--- protocols/jabber/jabber_util.c	(revision abbd8ede1eb5eeb9b82e09357e0b38949bc95b8d)
+++ protocols/jabber/jabber_util.c	(revision 47d3ac46306965e9db66096eef8c60c8e7985950)
@@ -104,5 +104,5 @@
 	/* Create the "defined-condition" tag. */
 	c = xt_new_node( err_cond, NULL, NULL );
-	xt_add_attr( c, "xmlns", "urn:ietf:params:xml:ns:xmpp-stanzas" );
+	xt_add_attr( c, "xmlns", XMLNS_STANZA_ERROR );
 	
 	/* Put it in an <error> tag. */
Index: protocols/jabber/sasl.c
===================================================================
--- protocols/jabber/sasl.c	(revision abbd8ede1eb5eeb9b82e09357e0b38949bc95b8d)
+++ protocols/jabber/sasl.c	(revision 47d3ac46306965e9db66096eef8c60c8e7985950)
@@ -24,6 +24,4 @@
 #include "jabber.h"
 #include "base64.h"
-
-#define SASL_NS "urn:ietf:params:xml:ns:xmpp-sasl"
 
 xt_status sasl_pkt_mechanisms( struct xt_node *node, gpointer data )
@@ -45,5 +43,5 @@
 	
 	s = xt_find_attr( node, "xmlns" );
-	if( !s || strcmp( s, SASL_NS ) != 0 )
+	if( !s || strcmp( s, XMLNS_SASL ) != 0 )
 	{
 		signoff( gc );
@@ -70,5 +68,5 @@
 	
 	reply = xt_new_node( "auth", NULL, NULL );
-	xt_add_attr( reply, "xmlns", SASL_NS );
+	xt_add_attr( reply, "xmlns", XMLNS_SASL );
 	
 	if( sup_digest )
@@ -272,5 +270,5 @@
 	
 	reply = xt_new_node( "response", s, NULL );
-	xt_add_attr( reply, "xmlns", SASL_NS );
+	xt_add_attr( reply, "xmlns", XMLNS_SASL );
 	
 	if( !jabber_write_packet( gc, reply ) )
@@ -303,5 +301,5 @@
 	
 	s = xt_find_attr( node, "xmlns" );
-	if( !s || strcmp( s, SASL_NS ) != 0 )
+	if( !s || strcmp( s, XMLNS_SASL ) != 0 )
 	{
 		signoff( gc );
