From 7568f0c64e911eb3e50c37eacee6234d29e1023e Mon Sep 17 00:00:00 2001 From: AchtBit <8bitfur@gmail.com> Date: Tue, 17 Feb 2015 19:27:51 -0600 Subject: [PATCH] Increase maxDelay instead of QR.cooldown.maxDelay. --- src/Posting/QR.cooldown.coffee | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Posting/QR.cooldown.coffee b/src/Posting/QR.cooldown.coffee index c4ea679cb..50bf5aee4 100644 --- a/src/Posting/QR.cooldown.coffee +++ b/src/Posting/QR.cooldown.coffee @@ -105,15 +105,13 @@ QR.cooldown = seconds = Math.max seconds, cooldown.delay - elapsed continue - # Increase the max delay if additional cooldown is enabled - if QR.cooldown.addCooldown - QR.cooldown.maxDelay = QR.cooldown.maxDelay + parseInt(Conf['additionalCooldown']) - # Clean up expired cooldowns maxDelay = if cooldown.threadID isnt cooldown.postID QR.cooldown.maxDelay else QR.cooldown.delays[if scope is 'global' then 'thread_global' else 'thread'] + if QR.cooldown.addCooldown + maxDelay += parseInt(Conf['additionalCooldown']) if maxDelay <= elapsed delete QR.cooldown[scope][start] save = true