super useful plugin that shuffles the message you send.
This commit is contained in:
parent
be8ea85a9f
commit
ca7489fd8f
1 changed files with 11 additions and 0 deletions
11
plugins/shuffle.py
Normal file
11
plugins/shuffle.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from plugin import BasePlugin
|
||||
from random import shuffle
|
||||
|
||||
class Plugin(BasePlugin):
|
||||
def init(self):
|
||||
self.add_event_handler('muc_say', self.shuffle)
|
||||
|
||||
def shuffle(self, msg, tab):
|
||||
split = msg['body'].split()
|
||||
shuffle(split)
|
||||
msg['body'] = ' '.join(split)
|
Loading…
Reference in a new issue