Added stripping of prefix characters from help argument.

This commit is contained in:
Jeremy Fincher 2003-10-19 19:19:47 +00:00
parent 1eb2a387eb
commit d21a99a37a
2 changed files with 3 additions and 0 deletions

View File

@ -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)

View File

@ -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')