poezio/plugins/double.py

11 lines
278 B
Python
Raw Normal View History

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']