summaryrefslogtreecommitdiff
path: root/plugins/double.py
blob: 04728bbf0bdd75955d107741e127dae9c797a719 (plain)
1
2
3
4
5
6
7
8
9
10
from plugin import BasePlugin

class Plugin(BasePlugin):
    def init(self):
        self.add_event_handler('muc_say', self.double)

    def double(self, msg, tab):
        split = msg['body'].split()
        if split:
            msg['body'] = split[0] + ' ' + msg['body']