blob: 387878f4e51dff84f8d871e34e016cf7f7ca1493 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
"""
Show the exchanged IQs (useful for debugging).
"""
from plugin import BasePlugin
from slixmpp.xmlstream.matcher import StanzaPath
from slixmpp.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.api.information('%s' % iq, 'Iq')
def cleanup(self):
self.core.xmpp.remove_handler('Iq_show')
|