diff options
author | Nathan Fritz <fritzy@netflint.net> | 2009-10-29 03:22:50 +0000 |
---|---|---|
committer | Nathan Fritz <fritzy@netflint.net> | 2009-10-29 03:22:50 +0000 |
commit | 1fa1f7dcc63ac6312cc5aafde191aad1f026deb9 (patch) | |
tree | d557816942c65df8455ee8f2b0cb65478ab98013 /sleekxmpp | |
parent | a22100bb38f1b95e84f7dd15bc24a8c7ac2561ad (diff) | |
download | slixmpp-1fa1f7dcc63ac6312cc5aafde191aad1f026deb9.tar.gz slixmpp-1fa1f7dcc63ac6312cc5aafde191aad1f026deb9.tar.bz2 slixmpp-1fa1f7dcc63ac6312cc5aafde191aad1f026deb9.tar.xz slixmpp-1fa1f7dcc63ac6312cc5aafde191aad1f026deb9.zip |
* added init option for component namespace
Diffstat (limited to 'sleekxmpp')
-rwxr-xr-x | sleekxmpp/componentxmpp.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sleekxmpp/componentxmpp.py b/sleekxmpp/componentxmpp.py index 36a4b7f8..446f3d85 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 = "<stream:stream xmlns='jabber:component:accept' xmlns:stream='http://etherx.jabber.org/streams' to='%s'>" % jid |