Update Factoids.getCommandHelp to respect supybot.reply.showSimpleSyntax

This commit is contained in:
James Vega 2008-12-22 02:21:07 +00:00
parent eb6117da4f
commit 08a0531bf7

View File

@ -103,10 +103,14 @@ class Factoids(callbacks.Plugin, plugins.ChannelDBHandler):
method = self.getCommandMethod(command)
if method.im_func.func_name == 'learn':
s = self.registryValue('learnSeparator', dynamic.msg.args[0])
return callbacks.getHelp(method,
help = callbacks.getHelp
if conf.get(conf.supybot.reply.showSimpleSyntax,
dynamic.msg.args[0]):
help = callbacks.getSyntax
return help(method,
doc=method._fake__doc__ % (s, s),
name=callbacks.formatCommand(command))
return super(Factoids, self).getCommandHelp(self, command)
return self.__parent.getCommandHelp(command)
def learn(self, irc, msg, args, channel, key, factoid):
db = self.getDb(channel)