Fixed bug in list where _exec would show.

This commit is contained in:
Jeremy Fincher 2003-10-09 18:06:46 +00:00
parent b7f4cbe7d8
commit 18a8f81985
2 changed files with 4 additions and 2 deletions

View File

@ -115,8 +115,9 @@ class MiscCommands(callbacks.Privmsg):
not issubclass(cls, callbacks.PrivmsgRegexp) and \
issubclass(cls, callbacks.Privmsg):
commands = [x for x in dir(cls)
if cb.isCommand(x) and \
hasattr(getattr(cb, x), '__doc__')]
if cb.isCommand(x) and
hasattr(getattr(cb, x), '__doc__') and
callbacks.canonicalName(x) == x]
commands.sort()
irc.reply(msg, ', '.join(commands))
return

View File

@ -82,6 +82,7 @@ class MiscCommandsTestCase(ChannelPluginTestCase, PluginDocumentation):
self.failIf(self.irc.getCallback(name).public)
self.assertNotRegexp('list', name)
self.assertRegexp('list --private', name)
self.assertNotRegexp('list OwnerCommands', '_exec')
def testVersion(self):
self.assertNotError('version')