2012-12-18 01:03:24 +00:00
|
|
|
from plugin import BasePlugin
|
|
|
|
from random import shuffle
|
|
|
|
|
|
|
|
class Plugin(BasePlugin):
|
|
|
|
def init(self):
|
2013-03-08 21:53:35 +00:00
|
|
|
self.api.add_event_handler('muc_say', self.shuffle)
|
2012-12-18 01:03:24 +00:00
|
|
|
|
|
|
|
def shuffle(self, msg, tab):
|
|
|
|
split = msg['body'].split()
|
|
|
|
shuffle(split)
|
|
|
|
msg['body'] = ' '.join(split)
|