mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 21:29:24 +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):
|
||||
v = self._getConfig(conf.supybot.replies.success)
|
||||
s = self.__makeReply(v, s)
|
||||
return self.reply(s, **kwargs)
|
||||
if v:
|
||||
s = self.__makeReply(v, s)
|
||||
return self.reply(s, **kwargs)
|
||||
else:
|
||||
self.noReply()
|
||||
|
||||
def replyError(self, s='', **kwargs):
|
||||
v = self._getConfig(conf.supybot.replies.error)
|
||||
|
@ -421,7 +421,8 @@ registerGroup(supybot, 'replies')
|
||||
|
||||
registerChannelValue(supybot.replies, 'success',
|
||||
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',
|
||||
registry.NormalizedString("""An error has occurred and has been logged.
|
||||
|
Loading…
Reference in New Issue
Block a user