diff options
author | Nathan Fritz <fritzy@netflint.net> | 2009-12-10 01:23:03 +0000 |
---|---|---|
committer | Nathan Fritz <fritzy@netflint.net> | 2009-12-10 01:23:03 +0000 |
commit | 007b04dd3086a0b02865c924022db70bbd47445e (patch) | |
tree | 664e27d3bea780e88ebc4cc6ac3c4014a654c056 /sleekxmpp/basexmpp.py | |
parent | 6be17ebbe27c17da01abe4fe1134e070c6ee632f (diff) | |
download | slixmpp-007b04dd3086a0b02865c924022db70bbd47445e.tar.gz slixmpp-007b04dd3086a0b02865c924022db70bbd47445e.tar.bz2 slixmpp-007b04dd3086a0b02865c924022db70bbd47445e.tar.xz slixmpp-007b04dd3086a0b02865c924022db70bbd47445e.zip |
* added proper message and iq stanzas. presence left to do
Diffstat (limited to 'sleekxmpp/basexmpp.py')
-rw-r--r-- | sleekxmpp/basexmpp.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py index 07715e0c..0f4f799c 100644 --- a/sleekxmpp/basexmpp.py +++ b/sleekxmpp/basexmpp.py @@ -26,6 +26,8 @@ from . xmlstream.handler.xmlcallback import XMLCallback from . xmlstream.handler.xmlwaiter import XMLWaiter from . xmlstream.handler.callback import Callback from . import plugins +from . stanza.message import Message +from . stanza.iq import Iq import logging import threading @@ -95,6 +97,8 @@ class basexmpp(object): self.registerHandler(Callback('IM', MatchMany((MatchXMLMask("<message xmlns='%s' type='chat'><body /></message>" % self.default_ns),MatchXMLMask("<message xmlns='%s' type='normal'><body /></message>" % self.default_ns),MatchXMLMask("<message xmlns='%s' type='__None__'><body /></message>" % self.default_ns))), self._handleMessage, thread=False)) self.registerHandler(Callback('Presence', MatchMany((MatchXMLMask("<presence xmlns='%s' type='available'/>" % self.default_ns),MatchXMLMask("<presence xmlns='%s' type='__None__'/>" % self.default_ns),MatchXMLMask("<presence xmlns='%s' type='unavailable'/>" % self.default_ns))), self._handlePresence, thread=False)) self.registerHandler(Callback('PresenceSubscribe', MatchMany((MatchXMLMask("<presence xmlns='%s' type='subscribe'/>" % self.default_ns),MatchXMLMask("<presence xmlns='%s' type='unsubscribed'/>" % self.default_ns))), self._handlePresenceSubscribe)) + self.registerStanza(Message) + self.registerStanza(Iq) def set_jid(self, jid): """Rip a JID apart and claim it as our own.""" |