From 80c515ea98c4d0c0e15082ad97dfe03186c1f94e Mon Sep 17 00:00:00 2001 From: Gravit Date: Sat, 4 May 2019 13:59:42 +0700 Subject: [PATCH] =?UTF-8?q?[FIX][=20=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BC?= =?UTF-8?q?=D0=BE=D0=B4=D1=83=D0=BB=D1=8F=20ScriptEngine=20=D0=B8=20=D0=B4?= =?UTF-8?q?=D1=80=D1=83=D0=B3=D0=B8=D1=85=20=D0=BC=D0=B5=D0=BB=D0=BA=D0=B8?= =?UTF-8?q?=D1=85=20=D0=B1=D0=B0=D0=B3=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../launchserver/websocket/LauncherNettyServer.java | 2 +- .../websocket/json/auth/AuthResponse.java | 6 ++++-- Launcher/runtime/dialog/dialog.js | 12 ++++++++++++ modules | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/LauncherNettyServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/LauncherNettyServer.java index 0b9d53f9..9da937b3 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/LauncherNettyServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/LauncherNettyServer.java @@ -49,7 +49,7 @@ public void initChannel(NioSocketChannel ch) { pipeline.addLast(new WebSocketFrameHandler()); } }); - if(config.proxy.enabled) + if(config.proxy != null && config.proxy.enabled) { LogHelper.info("Connect to main server %s"); Request.service = StandartClientWebSocketService.initWebSockets(config.proxy.address, false); diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/auth/AuthResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/auth/AuthResponse.java index b8270a60..a824469e 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/auth/AuthResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/auth/AuthResponse.java @@ -116,8 +116,10 @@ public void execute(ChannelHandlerContext ctx, Client clientData) throws Excepti result.permissions = clientData.permissions; if(getSession) { - clientData.session = random.nextLong(); - LaunchServer.server.sessionManager.addClient(clientData); + if(clientData.session == 0) { + clientData.session = random.nextLong(); + LaunchServer.server.sessionManager.addClient(clientData); + } result.session = clientData.session; } if(initProxy) diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js index 8e195196..0cff19d2 100644 --- a/Launcher/runtime/dialog/dialog.js +++ b/Launcher/runtime/dialog/dialog.js @@ -240,6 +240,18 @@ function verifyLauncher(e) { //result.list весь список //result.list[0].name имя авторизации(не видно) //result.list[0].displayName имя авторизации(видно) + result.list.forEach(function(auth_type, i, arr) { + (function() { + //profilesList[serverBtn] = profile; + //var hold = serverBtn; + //var hIndex = index; + //serverBtn.setOnAction(function(event) { + // serverHolder.set(hold); + // settings.profile = hIndex; + //}); + authOptions.getItems().add(auth_type.displayName); + })(); + }); overlay.swap(0, processing.overlay, function(event) makeProfilesRequest(function(result) { settings.lastProfiles = result.profiles; updateProfilesList(result.profiles); diff --git a/modules b/modules index 9e3e7731..dd587f64 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 9e3e773124ced1d3530349a69c21854aa88eaf6b +Subproject commit dd587f64151ed253f0a4d0b7e6df5ef71e27bc53