From e65e148e4f0eb041a68b657c3400659c0d2e8b71 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 13 Apr 2013 21:00:23 +0200 Subject: [PATCH] Handle "You must wait X seconds before posting a reply" QR errors. --- src/qr.coffee | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qr.coffee b/src/qr.coffee index 4f7b0c2d4..2e4bc270f 100644 --- a/src/qr.coffee +++ b/src/qr.coffee @@ -968,6 +968,12 @@ QR = # Too many frequent mistyped captchas will auto-ban you! # On connection error, the post most likely didn't go through. QR.cooldown.set delay: 2 + else if err.textContent and m = err.textContent.match /wait\s(\d+)\ssecond/i + QR.cooldown.auto = if QR.captcha.isEnabled + !!QR.captcha.captchas.length + else + true + QR.cooldown.set delay: m[1] else # stop auto-posting QR.cooldown.auto = false QR.status()