poezio/plugins/iq_show.py
2011-11-15 01:27:42 +01:00

14 lines
449 B
Python

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