summaryrefslogtreecommitdiff
path: root/sleekxmpp/componentxmpp.py
diff options
context:
space:
mode:
authorThom Nichols <tmnichols@gmail.com>2010-06-01 22:40:37 -0400
committerThom Nichols <tmnichols@gmail.com>2010-06-01 22:40:37 -0400
commit1780ca900a9a78347745d95e7d8934ffae9d7594 (patch)
treeb65b78a036ac8ec7b63d6c620a73e22ed10f2aed /sleekxmpp/componentxmpp.py
parent8e95ae2948228ddc6d1b32eca2e64b847c756a71 (diff)
parente6c2fde2834fafbc35b52da7e523f2b351f53a15 (diff)
downloadslixmpp-1780ca900a9a78347745d95e7d8934ffae9d7594.tar.gz
slixmpp-1780ca900a9a78347745d95e7d8934ffae9d7594.tar.bz2
slixmpp-1780ca900a9a78347745d95e7d8934ffae9d7594.tar.xz
slixmpp-1780ca900a9a78347745d95e7d8934ffae9d7594.zip
merged a lot of fritzy's changes
Diffstat (limited to 'sleekxmpp/componentxmpp.py')
-rwxr-xr-xsleekxmpp/componentxmpp.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/sleekxmpp/componentxmpp.py b/sleekxmpp/componentxmpp.py
index 9c7a6125..de125814 100755
--- a/sleekxmpp/componentxmpp.py
+++ b/sleekxmpp/componentxmpp.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.5
+#!/usr/bin/python2.6
"""
SleekXMPP: The Sleek XMPP Library
@@ -54,6 +54,16 @@ class ComponentXMPP(basexmpp, XMLStream):
self.secret = secret
self.registerHandler(Callback('Handshake', MatchXPath('{jabber:component:accept}handshake'), self._handleHandshake))
+ def __getitem__(self, key):
+ if key in self.plugin:
+ return self.plugin[key]
+ else:
+ logging.warning("""Plugin "%s" is not loaded.""" % key)
+ return False
+
+ def get(self, key, default):
+ return self.plugin.get(key, default)
+
def incoming_filter(self, xmlobj):
if xmlobj.tag.startswith('{jabber:client}'):
xmlobj.tag = xmlobj.tag.replace('jabber:client', self.default_ns)