mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
refactored session checks for better readability
This commit is contained in:
parent
ceff78a821
commit
e19de8eb0b
4 changed files with 9 additions and 21 deletions
|
|
@ -2619,8 +2619,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (needCheckSession)
|
||||
{
|
||||
string serverHash = CryptoHandler.GetServerHash(serverIDhash, serverPublicKey, secretKey);
|
||||
bool notYggdrasil = type == LoginType.mojang || type == LoginType.microsoft;
|
||||
if ((notYggdrasil && ProtocolHandler.SessionCheck(uuid, sessionID, serverHash) )|| (type == LoginType.yggdrasil && ProtocolHandler.YggdrasilSessionCheck(uuid, sessionID, serverHash)))
|
||||
if (ProtocolHandler.SessionCheck(uuid, sessionID, serverHash, type))
|
||||
{
|
||||
session.ServerIDhash = serverIDhash;
|
||||
session.ServerPublicKey = serverPublicKey;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue