Mercurial > libervia-backend
diff src/plugins/plugin_xep_0249.py @ 1373:6d0e01809893
plugin text commands: minor docstrings improvments
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 19 Mar 2015 14:41:15 +0100 |
parents | 876c9fbd0b3d |
children | 73f8582c7c99 |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0249.py Thu Mar 19 14:38:02 2015 +0100 +++ b/src/plugins/plugin_xep_0249.py Thu Mar 19 14:41:15 2015 +0100 @@ -168,15 +168,15 @@ def cmd_invite(self, mess_data, profile): """invite someone in the room - @command (group): (JID) + @command (group): JID - JID: the JID of the person to invite """ jid_s = mess_data["unparsed"].strip() try: - assert(jid_s) + assert jid_s jid_ = jid.JID(jid_s) - assert(jid_.user) - assert(jid_.host) + assert jid_.user + assert jid_.host except (jid.InvalidFormat, AssertionError): feedback = _(u"You must provide a valid JID to invite, like in '/invite contact@example.net'") self.host.plugins[C.TEXT_CMDS].feedBack(feedback, mess_data, profile)