From d21a99a37a3c3570cf4f485249df2b434c310d6b Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 19 Oct 2003 19:19:47 +0000 Subject: [PATCH] Added stripping of prefix characters from help argument. --- src/MiscCommands.py | 2 ++ test/test_MiscCommands.py | 1 + 2 files changed, 3 insertions(+) diff --git a/src/MiscCommands.py b/src/MiscCommands.py index fc3bf4a6f..0a938de28 100755 --- a/src/MiscCommands.py +++ b/src/MiscCommands.py @@ -174,6 +174,8 @@ class MiscCommands(callbacks.Privmsg): argument list given by the command 'syntax'. """ command = callbacks.canonicalName(privmsgs.getArgs(args)) + # Users might expect "@help @list" to work. + command = command.lstrip(conf.prefixChars) cb = callbacks.findCallbackForCommand(irc, command) if cb: method = getattr(cb, command) diff --git a/test/test_MiscCommands.py b/test/test_MiscCommands.py index 33ec10847..964f22293 100644 --- a/test/test_MiscCommands.py +++ b/test/test_MiscCommands.py @@ -67,6 +67,7 @@ class MiscCommandsTestCase(ChannelPluginTestCase, PluginDocumentation): def testHelp(self): self.assertNotError('help list') + self.assertNotError('help @list') self.assertNotError('help syntax') self.assertRegexp('help help', r'^\x02\(help') self.assertError('help morehelp')