aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/core
diff options
context:
space:
mode:
authormarzavec <admin@marzavec.com>2018-05-20 00:15:34 +0200
committerGitHub <noreply@github.com>2018-05-20 00:15:34 +0200
commit7ccbf56eebc341e78737d0ff7e2a6a3c47a62281 (patch)
tree26d944fa1f36480264b7790aef5285393e97fcdd /server/src/core
parentHighlight Hotfix (diff)
parentnpm has been pkged with node for awhile now; we neednt list every pkg manager... (diff)
downloadhackchat-7ccbf56eebc341e78737d0ff7e2a6a3c47a62281.tar.gz
hackchat-7ccbf56eebc341e78737d0ff7e2a6a3c47a62281.zip
Merge pull request #12 from neelkamath/master
Documentation
Diffstat (limited to '')
-rw-r--r--server/src/core/rateLimiter.js4
-rw-r--r--server/src/core/server.js2
2 files changed, 1 insertions, 5 deletions
diff --git a/server/src/core/rateLimiter.js b/server/src/core/rateLimiter.js
index 0d94ef2..0c2a384 100644
--- a/server/src/core/rateLimiter.js
+++ b/server/src/core/rateLimiter.js
@@ -8,15 +8,13 @@
*
*/
-'use strict';
-
class Police {
/**
* Create a ratelimiter instance.
*/
constructor () {
this._records = {};
- this._halflife = 30000; // ms
+ this._halflife = 30 * 1000; // milliseconds
this._threshold = 25;
this._hashes = [];
}
diff --git a/server/src/core/server.js b/server/src/core/server.js
index 9bea738..855aeba 100644
--- a/server/src/core/server.js
+++ b/server/src/core/server.js
@@ -7,8 +7,6 @@
*
*/
-'use strict';
-
const wsServer = require('ws').Server;
const socketReady = require('ws').OPEN;
const crypto = require('crypto');