9885203c67
Also: - Add get_conversation_messages() to PluginAPI - Make plugins_autoload colon-separated instead of space-separated (for consistency) - Replace a JID() with a safeJID() in the uptime plugin
13 lines
421 B
Python
13 lines
421 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.api.information('%s' % iq, 'Iq')
|
|
|
|
def cleanup(self):
|
|
self.core.xmpp.remove_handler('Iq_show')
|