From 1fa1f7dcc63ac6312cc5aafde191aad1f026deb9 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Thu, 29 Oct 2009 03:22:50 +0000 Subject: [PATCH] * added init option for component namespace --- sleekxmpp/componentxmpp.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sleekxmpp/componentxmpp.py b/sleekxmpp/componentxmpp.py index 36a4b7f..446f3d8 100755 --- a/sleekxmpp/componentxmpp.py +++ b/sleekxmpp/componentxmpp.py @@ -50,9 +50,12 @@ except ImportError: class ComponentXMPP(basexmpp, XMLStream): """SleekXMPP's client class. Use only for good, not evil.""" - def __init__(self, jid, secret, host, port, plugin_config = {}, plugin_whitelist=[]): + def __init__(self, jid, secret, host, port, plugin_config = {}, plugin_whitelist=[], use_jc_ns=False): XMLStream.__init__(self) - self.default_ns = 'jabber:component:accept' + if use_jc_ns: + self.default_ns = 'jabber:client' + else: + self.default_ns = 'jabber:component:accept' basexmpp.__init__(self) self.auto_authorize = None self.stream_header = "" % jid