diff options
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 |