If replies.success is empty, don't send a success message at all.

This commit is contained in:
Jeremy Fincher 2004-10-02 18:28:58 +00:00
parent a982fe32fd
commit b03000ed42
2 changed files with 7 additions and 3 deletions

View File

@ -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)

View File

@ -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.