blob: 57dea3454a25c32d951eee041e1d24a9b4fa1c64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
"""
Shout
Installation
------------
You only have to load the plugin:
.. code-block:: none
/load capslock
"""
from plugin import BasePlugin
class Plugin(BasePlugin):
def init(self):
self.api.add_event_handler('muc_say', self.caps)
self.api.add_event_handler('conversation_say', self.caps)
self.api.add_event_handler('private_say', self.caps)
def caps(self, msg, tab):
msg['body'] = msg['body'].upper()
|