From efc32f8e3a94ec9629988f02f1ea72ae63e1f4b9 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 28 Dec 2019 00:48:11 -0500 Subject: [PATCH] Improved VIP downvote calculation. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 12db7e6..401f5fa 100644 --- a/index.js +++ b/index.js @@ -340,7 +340,7 @@ app.get('/api/voteOnSponsorTime', function (req, res) { db.prepare("SELECT votes, views FROM sponsorTimes WHERE UUID = ?").get(UUID, async function(err, row) { if (vipResult.row.userCount != 0 && incrementAmount < 0) { //this user is a vip and a downvote - incrementAmount = -Math.min(350, Math.floor(row.votes + 2)); + incrementAmount = -Math.min(350, row.votes + 2 - oldIncrementAmount); type = incrementAmount; } else if (row != null && (row.votes > 8 || row.views > 15) && incrementAmount < 0) { //increase the power of this downvote