mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-24 03:29:28 +01:00
If replies.success is empty, don't send a success message at all.
This commit is contained in:
parent
a982fe32fd
commit
b03000ed42
@ -414,8 +414,11 @@ class RichReplyMethods(object):
|
|||||||
|
|
||||||
def replySuccess(self, s='', **kwargs):
|
def replySuccess(self, s='', **kwargs):
|
||||||
v = self._getConfig(conf.supybot.replies.success)
|
v = self._getConfig(conf.supybot.replies.success)
|
||||||
|
if v:
|
||||||
s = self.__makeReply(v, s)
|
s = self.__makeReply(v, s)
|
||||||
return self.reply(s, **kwargs)
|
return self.reply(s, **kwargs)
|
||||||
|
else:
|
||||||
|
self.noReply()
|
||||||
|
|
||||||
def replyError(self, s='', **kwargs):
|
def replyError(self, s='', **kwargs):
|
||||||
v = self._getConfig(conf.supybot.replies.error)
|
v = self._getConfig(conf.supybot.replies.error)
|
||||||
|
@ -421,7 +421,8 @@ registerGroup(supybot, 'replies')
|
|||||||
|
|
||||||
registerChannelValue(supybot.replies, 'success',
|
registerChannelValue(supybot.replies, 'success',
|
||||||
registry.NormalizedString("""The operation succeeded.""", """Determines
|
registry.NormalizedString("""The operation succeeded.""", """Determines
|
||||||
what message the bot replies with when a command succeeded."""))
|
what message the bot replies with when a command succeeded. If this
|
||||||
|
configuration variable is empty, no success message will be sent."""))
|
||||||
|
|
||||||
registerChannelValue(supybot.replies, 'error',
|
registerChannelValue(supybot.replies, 'error',
|
||||||
registry.NormalizedString("""An error has occurred and has been logged.
|
registry.NormalizedString("""An error has occurred and has been logged.
|
||||||
|
Loading…
Reference in New Issue
Block a user