aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/serverLib
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-04-24 22:11:53 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-04-24 22:11:53 +0200
commit0bfab3415d41598eccc78190604f33d613c57b05 (patch)
tree46cbfa10311bf9ed6f68b8025c4b5a605692da51 /server/src/serverLib
parenttypo (diff)
downloadhackchat-0bfab3415d41598eccc78190604f33d613c57b05.tar.gz
hackchat-0bfab3415d41598eccc78190604f33d613c57b05.zip
no rate limit for localhost
Diffstat (limited to 'server/src/serverLib')
-rw-r--r--server/src/serverLib/MainServer.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/serverLib/MainServer.js b/server/src/serverLib/MainServer.js
index e2f62a5..ae26be3 100644
--- a/server/src/serverLib/MainServer.js
+++ b/server/src/serverLib/MainServer.js
@@ -164,7 +164,9 @@ class MainServer extends WsServer {
}
// Penalize here, but don't do anything about it
- if (!socket.mod) {
+ // Don't penalize localhost for bots
+ if (socket.address == "localhost" || socket.address == "127.0.0.1") {
+ } else {
this.police.frisk(socket.address, 1);
}