plugin text commands: minor docstrings improvments

This commit is contained in:
Goffi 2015-03-19 14:41:15 +01:00
commit 66230e2156
2 changed files with 5 additions and 4 deletions

View file

@ -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]

View file

@ -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)