Disable generic error reply when supybot.replies.error is empty

This commit is contained in:
Valentin Lorentz 2023-07-11 21:34:49 +02:00
parent eb002a31e9
commit 054ee6e410
2 changed files with 8 additions and 4 deletions

View File

@ -506,8 +506,11 @@ class RichReplyMethods(object):
msg = kwargs['msg']
if ircdb.checkCapability(msg.prefix, 'owner'):
v = self._getConfig(conf.supybot.replies.errorOwner)
if v:
s = self.__makeReply(v, s)
return self.reply(s, **kwargs)
else:
self.noReply()
def _getTarget(self, to=None):
"""Compute the target according to self.to, the provided to,

View File

@ -676,8 +676,9 @@ registerChannelValue(supybot.replies, 'success',
registerChannelValue(supybot.replies, 'error',
registry.NormalizedString(_("""An error has occurred and has been logged.
Please contact this bot's administrator for more information."""), _("""
Determines what error message the bot gives when it wants to be
Please contact this bot's administrator for more information.
If this configuration variable is empty, no generic error message will be sent."""),
_("""Determines what error message the bot gives when it wants to be
ambiguous.""")))
registerChannelValue(supybot.replies, 'errorOwner',