Fixed a slight ugliness, use dir() instead of __dict__.

This commit is contained in:
Jeremy Fincher 2003-05-29 16:36:34 +00:00
parent 6f7e3e53c1
commit 97ce807088

View File

@ -62,7 +62,7 @@ class MiscCommands(callbacks.Privmsg):
if cb.name().lower().startswith(name) and \
not issubclass(cls, callbacks.PrivmsgRegexp) and \
issubclass(cls, callbacks.Privmsg):
commands = [x for x in cls.__dict__
commands = [x for x in dir(cls)
if cb.isCommand(x) and \
hasattr(getattr(cb, x), '__doc__')]
commands.sort()