Mercurial > libervia-backend
diff src/plugins/plugin_misc_text_commands.py @ 1371:876c9fbd0b3d
plugin text command, XEP-0045, XEP-0048, XEP-0249: removed feedBackWrongContext which is no more usefull with new _contextValid method
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 19 Mar 2015 14:30:08 +0100 |
parents | 53c7678c27a6 |
children | 85caf0a3abb3 |
line wrap: on
line diff
--- a/src/plugins/plugin_misc_text_commands.py Thu Mar 19 14:29:03 2015 +0100 +++ b/src/plugins/plugin_misc_text_commands.py Thu Mar 19 14:30:08 2015 +0100 @@ -270,19 +270,6 @@ self.host.bridge.newMessage(unicode(mess_data["to"]), message, C.MESS_TYPE_INFO, unicode(_from), {}, profile=profile) - def feedBackWrongContext(self, command, types, mess_data, profile): - """Give a generic message to the user when a command has been used in a wrong context. - - @param command (string): the command name (without the slash) - @param types (string, list): the message types to which the command applies. - @param mess_data (dict): original message data - @param profile: %(doc_profile)s - """ - if not isinstance(types, str): - types = _(' or ').join(types) - feedback = _("/%(command)s command only applies on %(type)s messages. ") % {'command': command, 'type': types} - self.host.plugins[C.TEXT_CMDS].feedBack(feedback + self.HELP_SUGGESTION, mess_data, profile) - def cmd_whois(self, mess_data, profile): """show information on entity""" log.debug("Catched whois command")