aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--server/src/serverLib/MainServer.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/src/serverLib/MainServer.js b/server/src/serverLib/MainServer.js
index ae26be3..6ba2d8d 100644
--- a/server/src/serverLib/MainServer.js
+++ b/server/src/serverLib/MainServer.js
@@ -153,7 +153,7 @@ class MainServer extends WsServer {
*/
handleData(socket, data) {
// Don't penalize yet, but check whether IP is rate-limited
- if (this.police.frisk(socket.address, 0)) {
+ if (this.police.frisk(socket.address, 0) && socket.address != "127.0.0.1") {
this.core.commands.handleCommand(this, socket, {
cmd: 'socketreply',
cmdKey: this.cmdKey,
@@ -165,8 +165,7 @@ class MainServer extends WsServer {
// Penalize here, but don't do anything about it
// Don't penalize localhost for bots
- if (socket.address == "localhost" || socket.address == "127.0.0.1") {
- } else {
+ if (socket.address != "127.0.0.1") {
this.police.frisk(socket.address, 1);
}