aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/core
diff options
context:
space:
mode:
authorneelkamath <neelkamath@protonmail.com>2018-05-11 17:16:12 +0200
committerneelkamath <neelkamath@protonmail.com>2018-05-11 17:16:12 +0200
commit73e5c5ccfe408e58eb4bb927c71a77e0fceb22c4 (patch)
tree22b19a574ae856a6df24ce56c149da03ef440d88 /server/src/core
parentAdd license as a file in the repo as GitHub's documentation (diff)
downloadhackchat-73e5c5ccfe408e58eb4bb927c71a77e0fceb22c4.tar.gz
hackchat-73e5c5ccfe408e58eb4bb927c71a77e0fceb22c4.zip
Remove forgettable, unused, occasionally harmful (w.r.t. ES6) directive
Diffstat (limited to 'server/src/core')
-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');