summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-11-15 01:27:42 +0100
committermathieui <mathieui@mathieui.net>2011-11-15 01:27:42 +0100
commitb82b99f2661c2fa40e319d7205330f523223bc1b (patch)
tree47d599e550aee5e0b81cf9d5728f912323deb04b /plugins
parentef6425b4e97f47b5855c12cf0f81ca2d4cc1a4b1 (diff)
downloadpoezio-b82b99f2661c2fa40e319d7205330f523223bc1b.tar.gz
poezio-b82b99f2661c2fa40e319d7205330f523223bc1b.tar.bz2
poezio-b82b99f2661c2fa40e319d7205330f523223bc1b.tar.xz
poezio-b82b99f2661c2fa40e319d7205330f523223bc1b.zip
Add an iq_show plugin
Fixes #2075
Diffstat (limited to 'plugins')
-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