plugins TEXT-COMMANDS, XEP-0045, XEP-0048, XEP-0249:

- give a feedback instead of sending the message when the command is invalid or used in a wrong context
    - add command /join for XEP-0249
This commit is contained in:
souliane 2014-04-30 16:34:09 +02:00
commit 42b1b6c4ed

View file

@ -428,9 +428,8 @@ class XEP_0048(object):
txt_cmd = self.host.plugins[C.TEXT_CMDS]
if mess_data['type'] != "groupchat":
#/bookmark command does nothing if we are not on a group chat
log.info("Ignoring /bookmark command on a non groupchat message")
return True
self.host.plugins[C.TEXT_CMDS].feedBackWrongContext('bookmark', 'groupchat', mess_data, profile)
return False
options = mess_data["unparsed"].strip().split()
if options and options[0] not in ('autojoin', 'remove'):