2013-04-13 20:33:06 +00:00
|
|
|
"""
|
|
|
|
Double the first word of any message you send in a :ref:`muctab`, making you appear retarded.
|
|
|
|
|
|
|
|
Installation
|
|
|
|
------------
|
|
|
|
|
|
|
|
You only have to load the plugin:
|
|
|
|
|
|
|
|
.. code-block:: none
|
|
|
|
|
|
|
|
/load double
|
|
|
|
"""
|
2012-12-18 00:54:20 +00:00
|
|
|
from plugin import BasePlugin
|
|
|
|
|
|
|
|
class Plugin(BasePlugin):
|
|
|
|
def init(self):
|
2013-03-08 21:53:35 +00:00
|
|
|
self.api.add_event_handler('muc_say', self.double)
|
2012-12-18 00:54:20 +00:00
|
|
|
|
|
|
|
def double(self, msg, tab):
|
|
|
|
split = msg['body'].split()
|
|
|
|
if split:
|
|
|
|
msg['body'] = split[0] + ' ' + msg['body']
|