poezio/plugins/double.py
mathieui 9885203c67 Update the plugins to use the PluginAPI
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
2013-03-08 22:53:35 +01:00

10 lines
278 B
Python

from plugin import BasePlugin
class Plugin(BasePlugin):
def init(self):
self.api.add_event_handler('muc_say', self.double)
def double(self, msg, tab):
split = msg['body'].split()
if split:
msg['body'] = split[0] + ' ' + msg['body']