From 8377bc3b3ac94cffff87995e0d3e5c180cca839d Mon Sep 17 00:00:00 2001 From: urlbot Date: Sat, 2 Aug 2014 17:33:28 +0200 Subject: [PATCH] when rate limited, report for how long --- eventlooper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eventlooper.py b/eventlooper.py index bfda027..239322a 100755 --- a/eventlooper.py +++ b/eventlooper.py @@ -87,7 +87,7 @@ def ratelimit_exceeded(): if (now - first) < hist_max_time: if hist_flag: hist_flag = False - chat_write('(rate limited to %d messages in %d seconds)' %(hist_max_count, hist_max_time)) + chat_write('(rate limited to %d messages in %d seconds, try again at %s)' %(hist_max_count, hist_max_time, time.strftime('%T %Z', time.localtime(hist_ts[0] + hist_max_time)))) logger('warn', 'rate limiting exceeded: ' + pickle.dumps(hist_ts)) return True