mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add login request and response debug messages
See #269 + Add exaxct mono packages in README, thanks @Pokechu22 for that
This commit is contained in:
parent
bab472df05
commit
ffb1adeb4d
2 changed files with 9 additions and 2 deletions
|
|
@ -219,9 +219,13 @@ namespace MinecraftClient.Protocol
|
|||
string result = "";
|
||||
|
||||
string json_request = "{\"agent\": { \"name\": \"Minecraft\", \"version\": 1 }, \"username\": \"" + JsonEncode(user) + "\", \"password\": \"" + JsonEncode(pass) + "\", \"clientToken\": \"" + JsonEncode(session.ClientID) + "\" }";
|
||||
if (Settings.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted("§8Debug: Login Request: " + json_request);
|
||||
int code = DoHTTPSPost("authserver.mojang.com", "/authenticate", json_request, ref 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