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
11 lines
295 B
Python
11 lines
295 B
Python
from plugin import BasePlugin
|
|
from random import shuffle
|
|
|
|
class Plugin(BasePlugin):
|
|
def init(self):
|
|
self.api.add_event_handler('muc_say', self.shuffle)
|
|
|
|
def shuffle(self, msg, tab):
|
|
split = msg['body'].split()
|
|
shuffle(split)
|
|
msg['body'] = ' '.join(split)
|