aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/serverLib
diff options
context:
space:
mode:
authormarzavec <admin@marzavec.com>2019-11-07 18:46:55 +0100
committermarzavec <admin@marzavec.com>2019-11-07 18:46:55 +0100
commitf34ee18c301322ea02009efcc10ce86d350c68d0 (patch)
tree71a5b12a873f7c76e5dff03371349008ae826d8e /server/src/serverLib
parentUpdate DEPLOY.md (diff)
downloadhackchat-f34ee18c301322ea02009efcc10ce86d350c68d0.tar.gz
hackchat-f34ee18c301322ea02009efcc10ce86d350c68d0.zip
Minor bug fixes
Diffstat (limited to 'server/src/serverLib')
-rw-r--r--server/src/serverLib/RateLimiter.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/serverLib/RateLimiter.js b/server/src/serverLib/RateLimiter.js
index 3f9bc27..a4a0cd8 100644
--- a/server/src/serverLib/RateLimiter.js
+++ b/server/src/serverLib/RateLimiter.js
@@ -77,7 +77,7 @@ class RateLimiter {
return true;
}
- record.score *= 2 ** -(Date.now() - record.time) / this.halflife;
+ record.score *= Math.pow(2, -(Date.now() - record.time ) / this.halflife);
record.score += deltaScore;
record.time = Date.now();