mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Added stripping of prefix characters from help argument.
This commit is contained in:
parent
1eb2a387eb
commit
d21a99a37a
@ -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)
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user