plugin text command, XEP-0045, XEP-0048, XEP-0249: removed feedBackWrongContext which is no more usefull with new _contextValid method
This commit is contained in:
parent
b2bb3ed564
commit
9443b14c59
1 changed files with 31 additions and 73 deletions
|
|
@ -270,19 +270,6 @@ class TextCommands(object):
|
|||
|
||||
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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue