Made list command sort its response.

This commit is contained in:
Jeremy Fincher 2003-03-28 07:23:12 +00:00
parent 4340162a48
commit 471397616b

View File

@ -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, ' \