From 18a8f81985933e20be83781842b289c2b55554a8 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 9 Oct 2003 18:06:46 +0000 Subject: [PATCH] Fixed bug in list where _exec would show. --- src/MiscCommands.py | 5 +++-- test/test_MiscCommands.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/MiscCommands.py b/src/MiscCommands.py index 32c9b505c..fc3bf4a6f 100755 --- a/src/MiscCommands.py +++ b/src/MiscCommands.py @@ -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 diff --git a/test/test_MiscCommands.py b/test/test_MiscCommands.py index fa56b55f1..33ec10847 100644 --- a/test/test_MiscCommands.py +++ b/test/test_MiscCommands.py @@ -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')