mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
fix mcc not showing the disconnect message
The fix is to remove the ParseText call from the OnConnectionLost call, as the ReadNextChat function already calls ParseText. Calling ParseText on an unparsable string returns an empty string, therefore the disconnect message never gets propagated to the user.
This commit is contained in:
parent
706a41ee26
commit
dc71332dd3
2 changed files with 3 additions and 3 deletions
|
|
@ -593,7 +593,7 @@ namespace MinecraftClient
|
|||
ConsoleInteractive.ConsoleReader.StopReadThread();
|
||||
ConsoleInteractive.ConsoleReader.MessageReceived -= ConsoleReaderOnMessageReceived;
|
||||
ConsoleInteractive.ConsoleReader.OnInputChange -= ConsoleIO.AutocompleteHandler;
|
||||
Program.HandleFailure(message, false, reason);
|
||||
Program.HandleFailure(null, false, reason);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2044,8 +2044,8 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
handler.OnPluginChannelMessage(channel, packetData.ToArray());
|
||||
return pForge.HandlePluginMessage(channel, packetData, ref currentDimension);
|
||||
case PacketTypesIn.Disconnect:
|
||||
handler.OnConnectionLost(ChatBot.DisconnectReason.InGameKick,
|
||||
ChatParser.ParseText(dataTypes.ReadNextChat(packetData)));
|
||||
handler.OnConnectionLost(ChatBot.DisconnectReason.InGameKick,
|
||||
dataTypes.ReadNextChat(packetData));
|
||||
return false;
|
||||
case PacketTypesIn.SetCompression:
|
||||
if (protocolVersion is >= MC_1_8_Version and < MC_1_9_Version)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue