comparison src/plugins/plugin_misc_text_commands.py @ 2128:aa94f33fd2ad

plugin otr: various improvments: - messageSend trigger now use pre_xml_treatments so it doesn't block other triggers of higher priority - text commands now use a very high priority, as it is local command and should not be blocked in most of cases - new otrState signal, to send state change to frontends - history is not skipped anymore, a future option may change this behaviour - OTR trigger are skipped on groupchat messages - context_manager is now in client instead of being global to plugin - removed fixPotr as it is fixed upstream note triggers should be improved for encryption methods, as skipping an encrypter may break security, but putting it in top priority may break nice features. fix bug 170
author Goffi <goffi@goffi.org>
date Wed, 01 Feb 2017 21:44:24 +0100
parents 98672e35d2f5
children 1d3f73e065e1
comparison
equal deleted inserted replaced
2127:8717e9cc95c0 2128:aa94f33fd2ad
57 HELP_SUGGESTION = _("Type '/help' to get a list of the available commands. If you didn't want to use a command, please start your message with '//' to escape the slash.") 57 HELP_SUGGESTION = _("Type '/help' to get a list of the available commands. If you didn't want to use a command, please start your message with '//' to escape the slash.")
58 58
59 def __init__(self, host): 59 def __init__(self, host):
60 log.info(_("Text commands initialization")) 60 log.info(_("Text commands initialization"))
61 self.host = host 61 self.host = host
62 host.trigger.add("messageSend", self.messageSendTrigger) 62 # this is internal command, so we set high priority
63 host.trigger.add("messageSend", self.messageSendTrigger, priority=1000000)
63 self._commands = {} 64 self._commands = {}
64 self._whois = [] 65 self._whois = []
65 self.registerTextCommands(self) 66 self.registerTextCommands(self)
66 67
67 def _parseDocString(self, cmd, cmd_name): 68 def _parseDocString(self, cmd, cmd_name):