mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Improve session caching
- Change SessionCache.db to SessionCache.ini Allows users to view and edit session cache - Automatically import previous SessionCache.db But this file is only read, not updated - Automatically import Minecraft session If you are logged in in Minecraft, no need to login again This is only done if Disk session cache is enabled See #232 and #430 for more information - Disk session cache becomes default The feature is no longer experimental and now recommended as the Mojang login servers now have a severe rate limit Previous default was Memory session cache, not saved to disk
This commit is contained in:
parent
a37e340613
commit
18fd24d2d5
5 changed files with 155 additions and 32 deletions
|
|
@ -8,7 +8,6 @@ using System.Net.Sockets;
|
|||
using System.Net.Security;
|
||||
using MinecraftClient.Protocol.Handlers.Forge;
|
||||
|
||||
|
||||
namespace MinecraftClient.Protocol
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -229,10 +228,10 @@ namespace MinecraftClient.Protocol
|
|||
if (Settings.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted("§8Debug: Login Request: " + json_request);
|
||||
int code = DoHTTPSPost("authserver.mojang.com", "/authenticate", json_request, ref result);
|
||||
if (Settings.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted("§8Debug: Login Response: " + result);
|
||||
if (code == 200)
|
||||
{
|
||||
if (Settings.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted("§8Debug: Login Response: " + result);
|
||||
if (result.Contains("availableProfiles\":[]}"))
|
||||
{
|
||||
return LoginResult.NotPremium;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue