mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Made list command sort its response.
This commit is contained in:
parent
4340162a48
commit
471397616b
@ -55,6 +55,7 @@ class MiscCommands(callbacks.Privmsg):
|
|||||||
names = [cb.__class__.__name__
|
names = [cb.__class__.__name__
|
||||||
for cb in irc.callbacks
|
for cb in irc.callbacks
|
||||||
if hasattr(cb, 'public') and cb.public]
|
if hasattr(cb, 'public') and cb.public]
|
||||||
|
names.sort()
|
||||||
irc.reply(msg, ', '.join(names))
|
irc.reply(msg, ', '.join(names))
|
||||||
else:
|
else:
|
||||||
for cb in irc.callbacks:
|
for cb in irc.callbacks:
|
||||||
@ -65,6 +66,7 @@ class MiscCommands(callbacks.Privmsg):
|
|||||||
commands = [x for x in cls.__dict__
|
commands = [x for x in cls.__dict__
|
||||||
if cb.isCommand(x) and \
|
if cb.isCommand(x) and \
|
||||||
hasattr(getattr(cb, x), '__doc__')]
|
hasattr(getattr(cb, x), '__doc__')]
|
||||||
|
commands.sort()
|
||||||
irc.reply(msg, ', '.join(commands))
|
irc.reply(msg, ', '.join(commands))
|
||||||
return
|
return
|
||||||
irc.error(msg, 'There is no module named %s, ' \
|
irc.error(msg, 'There is no module named %s, ' \
|
||||||
|
Loading…
Reference in New Issue
Block a user