poezio/plugins/iq_show.py
mathieui 2ce849968f fix a traceback on /unload iq_show
(also, per-tab option load_logs)
2012-12-16 14:58:44 +01:00

13 lines
422 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')