From af0deb7f87ef572d37327807dd2b1c50c4406d3f Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 3 Aug 2023 08:15:30 +0300 Subject: [PATCH] boost comments made during the night too --- files/routes/votes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/routes/votes.py b/files/routes/votes.py index bef4b833e..d8e998fb8 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -145,6 +145,8 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): x += target.body_html.count('" rel="nofollow noopener" target="_blank">') target.realupvotes += min(x*2, 20) mul += min(x/10, 1) + elif SITE == 'rdrama.net' and cls == Comment and 6 <= datetime.fromtimestamp(target.created_utc).hour <= 10: + mul = 2 target.realupvotes = floor(target.realupvotes * mul)