mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FEATURE] connectUUID
This commit is contained in:
parent
977f8dfaec
commit
b93848055b
2 changed files with 8 additions and 2 deletions
|
@ -31,9 +31,9 @@ public void invoke(String... args) {
|
|||
Client client = frameHandler.getClient();
|
||||
String ip = IOHelper.getIP(channel.remoteAddress());
|
||||
if (!client.isAuth)
|
||||
LogHelper.info("Channel %s | checkSign %s", ip, client.checkSign ? "true" : "false");
|
||||
LogHelper.info("Channel %s | connectUUID %s | checkSign %s", ip, frameHandler.getConnectUUID(), client.checkSign ? "true" : "false");
|
||||
else {
|
||||
LogHelper.info("Client name %s | ip %s", client.username == null ? "null" : client.username, ip);
|
||||
LogHelper.info("Client name %s | ip %s | connectUUID %s", client.username == null ? "null" : client.username, ip, frameHandler.getConnectUUID());
|
||||
LogHelper.subInfo("Data: checkSign %s | isSecure %s | auth_id %s", client.checkSign ? "true" : "false", client.isSecure ? "true" : "false",
|
||||
client.auth_id);
|
||||
LogHelper.subInfo("Permissions: %s (long %d)", client.permissions == null ? "null" : client.permissions.toString(), client.permissions == null ? 0 : client.permissions.toLong());
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
import pro.gravit.utils.helper.IOHelper;
|
||||
import pro.gravit.utils.helper.LogHelper;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class WebSocketFrameHandler extends SimpleChannelInboundHandler<WebSocketFrame> {
|
||||
|
@ -25,6 +26,7 @@ public WebSocketFrameHandler(NettyConnectContext context, LaunchServer srv, WebS
|
|||
}
|
||||
|
||||
private Client client;
|
||||
private final UUID connectUUID = UUID.randomUUID();
|
||||
|
||||
static {
|
||||
}
|
||||
|
@ -37,6 +39,10 @@ public Client getClient() {
|
|||
return client;
|
||||
}
|
||||
|
||||
public final UUID getConnectUUID() {
|
||||
return connectUUID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void channelActive(ChannelHandlerContext ctx) {
|
||||
if (LogHelper.isDevEnabled()) {
|
||||
|
|
Loading…
Reference in a new issue