summaryrefslogtreecommitdiff
path: root/plugins/iq_show.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-11-15 12:30:09 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-11-15 12:30:09 +0100
commitd789a59f0c1d849e3074c890913882f09b048cd2 (patch)
tree4f6d62c7f5a5c4abafe0e9ff9546be7f136d4d3b /plugins/iq_show.py
parent4e201be745521ace9701623d684dde316cb43af4 (diff)
parent4208920f425e9f37072715e52a5c7e95f074ab6e (diff)
downloadpoezio-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.py14
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