Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0048.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 | 291eb8216f6e |
children | 6d0e01809893 |
comparison
equal
deleted
inserted
replaced
1370:53c7678c27a6 | 1371:876c9fbd0b3d |
---|---|
421 """(Un)bookmark a MUC room | 421 """(Un)bookmark a MUC room |
422 | 422 |
423 @command (group): [autojoin | remove] | 423 @command (group): [autojoin | remove] |
424 - autojoin: join room automatically on connection | 424 - autojoin: join room automatically on connection |
425 """ | 425 """ |
426 log.debug("Catched bookmark command") | |
427 client = self.host.getClient(profile) | 426 client = self.host.getClient(profile) |
428 txt_cmd = self.host.plugins[C.TEXT_CMDS] | 427 txt_cmd = self.host.plugins[C.TEXT_CMDS] |
429 | |
430 if mess_data['type'] != "groupchat": | |
431 self.host.plugins[C.TEXT_CMDS].feedBackWrongContext('bookmark', 'groupchat', mess_data, profile) | |
432 return False | |
433 | 428 |
434 options = mess_data["unparsed"].strip().split() | 429 options = mess_data["unparsed"].strip().split() |
435 if options and options[0] not in ('autojoin', 'remove'): | 430 if options and options[0] not in ('autojoin', 'remove'): |
436 txt_cmd.feedBack(_("Bad arguments"), mess_data, profile) | 431 txt_cmd.feedBack(_("Bad arguments"), mess_data, profile) |
437 return False | 432 return False |