mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Allow getCommandHelp to be told whether to use simpleSyntax.
Use this to force Misc.help to ignore simpleSyntax since the user has explicitly asked for the help. Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
parent
7c89914d2d
commit
0d98118247
@ -197,7 +197,7 @@ class Misc(callbacks.Plugin):
|
||||
'you want help with.', names))
|
||||
else:
|
||||
assert cbs, 'Odd, maxL == command, but no cbs.'
|
||||
irc.reply(cbs[0].getCommandHelp(command))
|
||||
irc.reply(cbs[0].getCommandHelp(command, False))
|
||||
else:
|
||||
irc.error(format('There is no command %q.',
|
||||
callbacks.formatCommand(command)))
|
||||
|
@ -1197,13 +1197,15 @@ class Commands(BasePlugin):
|
||||
else:
|
||||
irc.replyError()
|
||||
|
||||
def getCommandHelp(self, command):
|
||||
def getCommandHelp(self, command, simpleSyntax=None):
|
||||
method = self.getCommandMethod(command)
|
||||
help = getHelp
|
||||
chan = None
|
||||
if dynamic.msg is not None:
|
||||
chan = dynamic.msg.args[0]
|
||||
if conf.get(conf.supybot.reply.showSimpleSyntax, chan):
|
||||
if simpleSyntax is None:
|
||||
simpleSyntax = conf.get(conf.supybot.reply.showSimpleSyntax, chan)
|
||||
if simpleSyntax:
|
||||
help = getSyntax
|
||||
if hasattr(method, '__doc__'):
|
||||
return help(method, name=formatCommand(command))
|
||||
|
Loading…
Reference in New Issue
Block a user