From 07018c0afa7485b06424bf6787d242e7ee523d34 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Thu, 17 Dec 2009 01:54:22 +0000 Subject: * 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) --- sleekxmpp/componentxmpp.py | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'sleekxmpp/componentxmpp.py') 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("" % self.default_ns), self._handlePresenceProbe)) self.registerHandler(Callback('Handshake', MatchXPath('{jabber:component:accept}handshake'), self._handleHandshake)) - self.registerHandler(Callback('PresenceSubscription', MatchMany(\ - (MatchXMLMask("" % self.default_ns), \ - MatchXMLMask("" % self.default_ns), \ - MatchXMLMask("" % self.default_ns), \ - MatchXMLMask("" % 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') -- cgit v1.2.3