diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-11-15 12:30:09 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-11-15 12:30:09 +0100 |
commit | d789a59f0c1d849e3074c890913882f09b048cd2 (patch) | |
tree | 4f6d62c7f5a5c4abafe0e9ff9546be7f136d4d3b /plugins/iq_show.py | |
parent | 4e201be745521ace9701623d684dde316cb43af4 (diff) | |
parent | 4208920f425e9f37072715e52a5c7e95f074ab6e (diff) | |
download | poezio-d789a59f0c1d849e3074c890913882f09b048cd2.tar.gz poezio-d789a59f0c1d849e3074c890913882f09b048cd2.tar.bz2 poezio-d789a59f0c1d849e3074c890913882f09b048cd2.tar.xz poezio-d789a59f0c1d849e3074c890913882f09b048cd2.zip |
Merge branch 'master' of http://git.louiz.org/poezio
Diffstat (limited to 'plugins/iq_show.py')
-rw-r--r-- | plugins/iq_show.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/iq_show.py b/plugins/iq_show.py new file mode 100644 index 00000000..bfb2105a --- /dev/null +++ b/plugins/iq_show.py @@ -0,0 +1,14 @@ +from plugin import BasePlugin +from sleekxmpp.xmlstream.matcher import StanzaPath +from sleekxmpp.xmlstream.handler import Callback + +class Plugin(BasePlugin): + def init(self): + self.core.xmpp.register_handler(Callback('Iq_show', StanzaPath('iq'), self.handle_iq)) + + def handle_iq(self, iq): + self.core.information('%s' % iq, 'Iq') + + def cleanup(self): + self.core.xmpp.remove_handler('Iq_show') + del self.handle_iq |