mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Added supybot.reply.noCapabilityError.
This commit is contained in:
parent
e8bba56f1f
commit
0cd95c63d5
@ -332,9 +332,10 @@ class RichReplyMethods(object):
|
||||
def errorNoCapability(self, capability, s='', **kwargs):
|
||||
log.warning('Denying %s for lacking %r capability',
|
||||
self.msg.prefix, capability)
|
||||
v = conf.supybot.replies.noCapability.get(self.msg.args[0])()
|
||||
s = self.__makeReply(v % capability, s)
|
||||
self.error(s, **kwargs)
|
||||
if not conf.supybot.reply.noCapabilityError():
|
||||
v = conf.supybot.replies.noCapability.get(self.msg.args[0])()
|
||||
s = self.__makeReply(v % capability, s)
|
||||
self.error(s, **kwargs)
|
||||
|
||||
def errorPossibleBug(self, s='', **kwargs):
|
||||
v = conf.supybot.replies.possibleBug.get(self.msg.args[0])()
|
||||
|
@ -170,6 +170,12 @@ error message (the uncaught exception) or a generic error message."""))
|
||||
supybot.reply.register('errorInPrivate', registry.Boolean(False, """
|
||||
Determines whether the bot will send error messages to users in private."""))
|
||||
|
||||
supybot.reply.register('noCapabilityError', registry.Boolean(False, """
|
||||
Determines whether the bot will send an error message to users who attempt to
|
||||
call a command for which they do not have the necessary capability. You may
|
||||
wish to make this False if you don't want users to understand the underlying
|
||||
security system preventing them from running certain commands."""))
|
||||
|
||||
supybot.reply.register('whenNotCommand', registry.Boolean(True, """
|
||||
Determines whether the bot will reply with an error message when it is
|
||||
addressed but not given a valid command. If this value is False, the bot
|
||||
|
Loading…
Reference in New Issue
Block a user