Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
2054:24827e550991 | 2055:ed33cd382bf9 |
---|---|
29 | 29 |
30 PLUGIN_INFO = { | 30 PLUGIN_INFO = { |
31 "name": "Text commands", | 31 "name": "Text commands", |
32 "import_name": C.TEXT_CMDS, | 32 "import_name": C.TEXT_CMDS, |
33 "type": "Misc", | 33 "type": "Misc", |
34 "protocols": [], | 34 "protocols": ["XEP-0245"], |
35 "dependencies": [], | 35 "dependencies": [], |
36 "main": "TextCommands", | 36 "main": "TextCommands", |
37 "handler": "no", | 37 "handler": "no", |
38 "description": _("""IRC like text commands""") | 38 "description": _("""IRC like text commands""") |
39 } | 39 } |
349 arg_name = doc_name[8:] | 349 arg_name = doc_name[8:] |
350 strings.append(u"- {name}: {doc_help}".format(name=arg_name, doc_help=_(doc_help))) | 350 strings.append(u"- {name}: {doc_help}".format(name=arg_name, doc_help=_(doc_help))) |
351 | 351 |
352 return strings | 352 return strings |
353 | 353 |
354 def cmd_me(self, client, mess_data): | |
355 """display a message at third person | |
356 | |
357 @command (all): message | |
358 - message: message to show at third person | |
359 e.g.: "/me clenches his fist" will give "[YOUR_NICK] clenches his fist" | |
360 """ | |
361 # We just ignore the command as the match is done on receiption by clients | |
362 return True | |
363 | |
354 def cmd_help(self, client, mess_data): | 364 def cmd_help(self, client, mess_data): |
355 """show help on available commands | 365 """show help on available commands |
356 | 366 |
357 @command: [cmd_name] | 367 @command: [cmd_name] |
358 - cmd_name: name of the command for detailed help | 368 - cmd_name: name of the command for detailed help |