plugin text commands: minor docstrings improvments
This commit is contained in:
parent
a820e07d8f
commit
66230e2156
2 changed files with 5 additions and 4 deletions
|
|
@ -422,6 +422,7 @@ class XEP_0048(object):
|
|||
|
||||
@command (group): [autojoin | remove]
|
||||
- autojoin: join room automatically on connection
|
||||
- remove: remove bookmark(s) for this room
|
||||
"""
|
||||
client = self.host.getClient(profile)
|
||||
txt_cmd = self.host.plugins[C.TEXT_CMDS]
|
||||
|
|
|
|||
|
|
@ -168,15 +168,15 @@ class XEP_0249(object):
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue