mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
callbacks.py: Always error when capabilities aren't satisfied.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
parent
a42ab2e2d4
commit
d053a660b0
@ -465,13 +465,15 @@ class RichReplyMethods(object):
|
||||
if isinstance(capability, basestring): # checkCommandCapability!
|
||||
log.warning('Denying %s for lacking %q capability.',
|
||||
self.msg.prefix, capability)
|
||||
if not self._getConfig(conf.supybot.reply.error.noCapability):
|
||||
v = self._getConfig(conf.supybot.replies.noCapability)
|
||||
s = self.__makeReply(v % capability, s)
|
||||
return self._error(s, **kwargs)
|
||||
# noCapability means "don't send a specific capability error
|
||||
# message" not "don't send a capability error message at all", like
|
||||
# one would think
|
||||
if self._getConfig(conf.supybot.reply.error.noCapability):
|
||||
v = self._getConfig(conf.supybot.replies.genericNoCapability)
|
||||
else:
|
||||
log.debug('Not sending capability error, '
|
||||
'supybot.reply.error.noCapability is False.')
|
||||
v = self._getConfig(conf.supybot.replies.noCapability)
|
||||
s = self.__makeReply(v % capability, s)
|
||||
return self._error(s, **kwargs)
|
||||
else:
|
||||
log.warning('Denying %s for some unspecified capability '
|
||||
'(or a default).', self.msg.prefix)
|
||||
|
Loading…
Reference in New Issue
Block a user