diff options
author | marzavec <admin@marzavec.com> | 2019-11-07 18:46:55 +0100 |
---|---|---|
committer | marzavec <admin@marzavec.com> | 2019-11-07 18:46:55 +0100 |
commit | f34ee18c301322ea02009efcc10ce86d350c68d0 (patch) | |
tree | 71a5b12a873f7c76e5dff03371349008ae826d8e /server/src/serverLib | |
parent | Update DEPLOY.md (diff) | |
download | hackchat-f34ee18c301322ea02009efcc10ce86d350c68d0.tar.gz hackchat-f34ee18c301322ea02009efcc10ce86d350c68d0.zip |
Minor bug fixes
Diffstat (limited to 'server/src/serverLib')
-rw-r--r-- | server/src/serverLib/RateLimiter.js | 2 |
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(); |