From 680aab399b14f9cc9ff7d382c378de433b4e3eab Mon Sep 17 00:00:00 2001 From: hippoz Date: Mon, 6 Sep 2021 19:46:09 +0300 Subject: [PATCH] replace terminology in log messages and such --- .eslintrc.js | 1 - brainlet/common/util/ratelimiter.js | 2 +- brainlet/index.js | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 6f8e58a..677ccea 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,6 +1,5 @@ module.exports = { "env": { - "browser": true, "commonjs": true, "es2021": true, "node": true diff --git a/brainlet/common/util/ratelimiter.js b/brainlet/common/util/ratelimiter.js index 56d3bce..c13a2be 100644 --- a/brainlet/common/util/ratelimiter.js +++ b/brainlet/common/util/ratelimiter.js @@ -10,7 +10,7 @@ class RateLimiter { } } -RateLimiter.prototype.consoom = function(discriminator) { +RateLimiter.prototype.consume = function(discriminator) { if (!this._flooding[discriminator]) this._flooding[discriminator] = { points: this.points, lastReset: Date.now() }; if (Math.abs(new Date() - this._flooding[discriminator].lastReset) >= this.time) { diff --git a/brainlet/index.js b/brainlet/index.js index 5060573..243e890 100755 --- a/brainlet/index.js +++ b/brainlet/index.js @@ -30,10 +30,10 @@ app.use("/api/v1", apiRoute); app.use(express.static("app")); app.use((err, req, res, next) => { - console.error("error: Internal server error", err); + console.error("error: server: internal server error", err); res.status(500).json({ error: true, status: 500, message: "ERR_INTERNAL_SERVER_ERROR" }); }); httpServer.listen(config.ports.mainServerPort, () => { - console.log(`[*] [server] Main server is listening on port ${config.ports.mainServerPort}`); + console.log(`server: listening on port ${config.ports.mainServerPort}`); });