changeset 1373:6d0e01809893

plugin text commands: minor docstrings improvments
author Goffi <goffi@goffi.org>
date Thu, 19 Mar 2015 14:41:15 +0100
parents 85caf0a3abb3
children 0befb14ecf62
files src/plugins/plugin_xep_0048.py src/plugins/plugin_xep_0249.py
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0048.py	Thu Mar 19 14:38:02 2015 +0100
+++ b/src/plugins/plugin_xep_0048.py	Thu Mar 19 14:41:15 2015 +0100
@@ -422,6 +422,7 @@
 
         @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]
--- 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)