mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Allow AutoRelog to relog on server login failed
- Add some explanations for adding a custom bot in the app - Remove debug code in ConsoleIO (see previous commit)
This commit is contained in:
parent
a543620a80
commit
09bff17fc2
4 changed files with 15 additions and 12 deletions
|
|
@ -183,14 +183,14 @@ namespace MinecraftClient
|
|||
System.IO.File.WriteAllText("debug.txt", dump);
|
||||
System.Diagnostics.Process.Start("debug.txt");
|
||||
}
|
||||
public bool OnConnectionLost()
|
||||
public bool OnConnectionLost(ChatBot.DisconnectReason reason, string reason_message)
|
||||
{
|
||||
if (!connectionlost)
|
||||
{
|
||||
connectionlost = true;
|
||||
for (int i = 0; i < bots.Count; i++)
|
||||
{
|
||||
if (bots[i].OnDisconnect(ChatBot.DisconnectReason.ConnectionLost, "Connection has been lost."))
|
||||
if (bots[i].OnDisconnect(reason, reason_message))
|
||||
{
|
||||
return true; //The client is about to restart
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue