From ea299c4feaad637805a87739ec2bd1318575bbff Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Mon, 24 Aug 2020 12:05:24 +0300 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D0=9D=D0=B5=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=D1=8C=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=B2=D1=8B=D0=B2?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0=20IP=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D0=BE=D0=B9=20clients.=20Closes=20#411.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/pro/gravit/launchserver/command/Command.java | 2 -- .../pro/gravit/launchserver/command/service/ClientsCommand.java | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/Command.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/Command.java index 32ed911e..684d79e8 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/Command.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/Command.java @@ -5,8 +5,6 @@ import java.util.Map; public abstract class Command extends pro.gravit.utils.command.Command { - - protected final LaunchServer server; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ClientsCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ClientsCommand.java index 9772a46a..63e68d1b 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ClientsCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ClientsCommand.java @@ -29,7 +29,7 @@ public void invoke(String... args) { service.channels.forEach((channel -> { WebSocketFrameHandler frameHandler = channel.pipeline().get(WebSocketFrameHandler.class); Client client = frameHandler.getClient(); - String ip = IOHelper.getIP(channel.remoteAddress()); + String ip = frameHandler.context.ip != null ? frameHandler.context.ip : IOHelper.getIP(channel.remoteAddress()); if (!client.isAuth) LogHelper.info("Channel %s | connectUUID %s | checkSign %s", ip, frameHandler.getConnectUUID(), client.checkSign ? "true" : "false"); else {