summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Baumann <derflob@derflob.de>2016-07-16 21:34:35 +1200
committerFlorian Baumann <derflob@derflob.de>2016-07-16 21:34:35 +1200
commitb0abfc6cf6a093704dfb97e63f733d7852106587 (patch)
treee866e855870f6d7ddcfb1cf38b3672287f232c27
parentd76ae648acaec4e0d21ea0eebd4e5b580b6c0fb5 (diff)
downloadxmpp-b0abfc6cf6a093704dfb97e63f733d7852106587.tar.gz
xmpp-b0abfc6cf6a093704dfb97e63f733d7852106587.tar.bz2
trui
-rw-r--r--__init__.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/__init__.py b/__init__.py
index da0557a..f1eae7c 100644
--- a/__init__.py
+++ b/__init__.py
@@ -349,12 +349,16 @@ class OctoXMPP(EventHandlerPlugin, SettingsPlugin):
if (len(cmd) == 0 or cmd[0] == 'all'):
lines.append("Available commands:")
for (attr, fn) in self.__dict__.items():
- if (attr.startswith('_cmd_') and hasattr(fn, 'xmpp_cmd') and not fn.hidden):
- lines.append("{} - {}".format(fn.xmpp_cmd, fn.desc))
+ if (hasattr(fn, 'xmpp_cmd') and not fn.hidden):
+ lines.append("{} - {}".format(fn.xmpp_cmd, fn.usage))
+ if (fn.desc):
+ lines.append("* {}\n".format(fn.desc))
else:
fn = getattr(self, "_cmd_{}".format(cmd[0]), None)
if (fn and hasattr(fn, 'xmpp_cmd')):
lines.append("{} - {}".format(fn.xmpp_cmd, fn.desc))
+ if (fn.desc):
+ lines.append("* {}".format(fn.desc))
else:
lines.append("{} not an available command.".format(cmd[0]))