diff options
author | Nathan Fritz <fritzy@netflint.net> | 2009-12-17 01:54:22 +0000 |
---|---|---|
committer | Nathan Fritz <fritzy@netflint.net> | 2009-12-17 01:54:22 +0000 |
commit | 07018c0afa7485b06424bf6787d242e7ee523d34 (patch) | |
tree | 5de2ae3309eb439b96d4dc5ce62abf00597f75f3 /sleekxmpp/componentxmpp.py | |
parent | 6897a0b57c299cff9e32fde4dcb4209e70fb4bcb (diff) | |
download | slixmpp-07018c0afa7485b06424bf6787d242e7ee523d34.tar.gz slixmpp-07018c0afa7485b06424bf6787d242e7ee523d34.tar.bz2 slixmpp-07018c0afa7485b06424bf6787d242e7ee523d34.tar.xz slixmpp-07018c0afa7485b06424bf6787d242e7ee523d34.zip |
* fixed many stanza bugs
* added stanza unhandled (unhandled iqs now reply with feature-not-implemented)
* added stanza exceptions (stanzas may now reply with exceptions when their handler raises an exception)
Diffstat (limited to 'sleekxmpp/componentxmpp.py')
-rwxr-xr-x | sleekxmpp/componentxmpp.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/sleekxmpp/componentxmpp.py b/sleekxmpp/componentxmpp.py index e6920897..4f1a190e 100755 --- a/sleekxmpp/componentxmpp.py +++ b/sleekxmpp/componentxmpp.py @@ -64,14 +64,7 @@ class ComponentXMPP(basexmpp, XMLStream): self.server_port = port self.set_jid(jid) self.secret = secret - self.registerHandler(Callback('PresenceProbe', MatchXMLMask("<presence xmlns='%s' type='probe'/>" % self.default_ns), self._handlePresenceProbe)) self.registerHandler(Callback('Handshake', MatchXPath('{jabber:component:accept}handshake'), self._handleHandshake)) - self.registerHandler(Callback('PresenceSubscription', MatchMany(\ - (MatchXMLMask("<presence xmlns='%s' type='subscribe'/>" % self.default_ns), \ - MatchXMLMask("<presence xmlns='%s' type='subscribed'/>" % self.default_ns), \ - MatchXMLMask("<presence xmlns='%s' type='unsubscribe'/>" % self.default_ns), \ - MatchXMLMask("<presence xmlns='%s' type='unsubscribed'/>" % self.default_ns) \ - )), self._handlePresenceSubscription)) def incoming_filter(self, xmlobj): if xmlobj.tag.startswith('{jabber:client}'): @@ -80,22 +73,6 @@ class ComponentXMPP(basexmpp, XMLStream): self.incoming_filter(sub) return xmlobj - - def _handlePresenceProbe(self, stanza): - xml = stanza.xml - self.event("got_presence_probe", ({ - 'from': xml.attrib['from'], - 'to': xml.attrib['to'] - })) - - def _handlePresenceSubscription(self, presence): - xml = presence.xml - self.event("changed_subscription", { - 'type' : xml.attrib['type'], - 'from': xml.attrib['from'], - 'to': xml.attrib['to'] - }) - def start_stream_handler(self, xml): sid = xml.get('id', '') handshake = ET.Element('{jabber:component:accept}handshake') |