mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-22 18:14:41 +01:00
Updated to respect channel-value-ish-ness of reply.showSimpleSyntax.
This commit is contained in:
parent
e7b8d8bcbc
commit
664c468130
@ -368,11 +368,11 @@ def findCallbackForCommand(irc, name):
|
||||
L.append(callback)
|
||||
return L
|
||||
|
||||
def formatArgumentError(method, name=None, channel=None):
|
||||
def formatArgumentError(method, name=None):
|
||||
if name is None:
|
||||
name = method.__name__
|
||||
if hasattr(method, '__doc__') and method.__doc__:
|
||||
if conf.get(conf.supybot.reply.showSimpleSyntax, channel):
|
||||
if conf.get(conf.supybot.reply.showSimpleSyntax, dynamic.channel):
|
||||
return getSyntax(method, name=name)
|
||||
else:
|
||||
return getHelp(method, name=name)
|
||||
@ -1080,6 +1080,11 @@ class Privmsg(irclib.IrcCallback):
|
||||
setattr(self.__class__, canonicalname, dispatcher)
|
||||
|
||||
def __call__(self, irc, msg):
|
||||
# This is for later dynamic scoping.
|
||||
if msg.args and irc.isChannel(msg.args[0]):
|
||||
channel = msg.args[0]
|
||||
else:
|
||||
channel = None
|
||||
if msg.command == 'PRIVMSG':
|
||||
if self.noIgnore or not ircdb.checkIgnored(msg.prefix,msg.args[0]):
|
||||
self.__parent.__call__(irc, msg)
|
||||
|
@ -389,7 +389,6 @@ registerGlobalValue(supybot, 'alwaysJoinOnInvite',
|
||||
a channel if the user inviting it has the 'admin' capability (or if it's
|
||||
explicitly told to join the channel using the Admin.join command)"""))
|
||||
|
||||
# XXX: ChannelValue-ishness is not respected for this yet.
|
||||
registerChannelValue(supybot.reply, 'showSimpleSyntax',
|
||||
registry.Boolean(False, """Supybot normally replies with the full help
|
||||
whenever a user misuses a command. If this value is set to True, the bot
|
||||
|
Loading…
Reference in New Issue
Block a user