From e30b5bab56f57bfb1310a1842be05ed562a86b0f Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Wed, 29 Apr 2020 17:09:49 +0200 Subject: fix ip because of network change --- server/src/commands/core/chat.js | 2 +- server/src/commands/core/join.js | 2 +- server/src/serverLib/MainServer.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server') diff --git a/server/src/commands/core/chat.js b/server/src/commands/core/chat.js index c69f6cb..44a6575 100644 --- a/server/src/commands/core/chat.js +++ b/server/src/commands/core/chat.js @@ -33,7 +33,7 @@ export async function run(core, server, socket, data) { // check for spam const score = text.length / 83 / 4; - if (socket.address != "::ffff:172.18.0.1") { + if (socket.address != "::ffff:172.19.0.1") { if (server.police.frisk(socket.address, score) && !UAC.isModerator(socket.level)) { return server.reply({ cmd: 'warn', diff --git a/server/src/commands/core/join.js b/server/src/commands/core/join.js index b22bc7d..32d0b17 100644 --- a/server/src/commands/core/join.js +++ b/server/src/commands/core/join.js @@ -66,7 +66,7 @@ export function parseNickname(core, data) { // module main export async function run(core, server, socket, data) { // check for spam - if (socket.address != "::ffff:172.18.0.1") { + if (socket.address != "::ffff:172.19.0.1") { if (server.police.frisk(socket.address, 3)) { return server.reply({ cmd: 'warn', diff --git a/server/src/serverLib/MainServer.js b/server/src/serverLib/MainServer.js index b463ede..ae33c99 100644 --- a/server/src/serverLib/MainServer.js +++ b/server/src/serverLib/MainServer.js @@ -155,7 +155,7 @@ class MainServer extends WsServer { // Don't penalize yet, but check whether IP is rate-limited console.log(socket.address) console.error(socket.address) - if (this.police.frisk(socket.address, 0) && socket.address != "::ffff:172.18.0.1") { + if (this.police.frisk(socket.address, 0) && socket.address != "::ffff:172.19.0.1") { this.core.commands.handleCommand(this, socket, { cmd: 'socketreply', cmdKey: this.cmdKey, @@ -167,7 +167,7 @@ class MainServer extends WsServer { // Penalize here, but don't do anything about it // Don't penalize localhost for bots - if (socket.address != "::ffff:172.18.0.1") { + if (socket.address != "::ffff:172.19.0.1") { this.police.frisk(socket.address, 1); } -- cgit v1.2.1