diff src/plugins/plugin_misc_text_commands.py @ 2055:ed33cd382bf9

plugin XEP-0245: removed plugin XEP-0245: at the end it adds complications to handle XEP-0245 in backend (because edge cases must be handled: info type with group chat, history when message is info but for a group chat, etc) while it's trivial to handle it in frontend. So /me detection is handled in QuickFrontend and cmd_me is back into plugin_misc_text_commands, it is the choice of the frontend to display or not the "/me" (for frontends based on QuickFrontend it remains automatic).
author Goffi <goffi@goffi.org>
date Sun, 28 Aug 2016 21:00:53 +0200
parents 200cd707a46d
children 98672e35d2f5
line wrap: on
line diff
--- a/src/plugins/plugin_misc_text_commands.py	Sun Aug 28 20:24:25 2016 +0200
+++ b/src/plugins/plugin_misc_text_commands.py	Sun Aug 28 21:00:53 2016 +0200
@@ -31,7 +31,7 @@
     "name": "Text commands",
     "import_name": C.TEXT_CMDS,
     "type": "Misc",
-    "protocols": [],
+    "protocols": ["XEP-0245"],
     "dependencies": [],
     "main": "TextCommands",
     "handler": "no",
@@ -351,6 +351,16 @@
 
         return strings
 
+    def cmd_me(self, client, mess_data):
+        """display a message at third person
+
+        @command (all): message
+            - message: message to show at third person
+                e.g.: "/me clenches his fist" will give "[YOUR_NICK] clenches his fist"
+        """
+        # We just ignore the command as the match is done on receiption by clients
+        return True
+
     def cmd_help(self, client, mess_data):
         """show help on available commands