Add 'exit on failure' setting

- Automatically close on connection lost or other failure
- Feature suggested by TorchRJ_
- Also, forgot to mention in 'App refactoring almost done' :
- Issue depending on username and/or server should be fixed
This commit is contained in:
ORelio 2014-05-31 12:56:54 +02:00
parent a2ce7ab2c4
commit c8332eb845
3 changed files with 12 additions and 6 deletions

View file

@ -218,11 +218,15 @@ namespace MinecraftClient
public static bool ReadLineReconnect()
{
string text = Console.ReadLine();
if (text == "reco" || text == "reconnect" || text == "/reco" || text == "/reconnect")
if (!Settings.exitOnFailure)
{
Program.Restart();
return true;
string text = Console.ReadLine();
if (text == "reco" || text == "reconnect" || text == "/reco" || text == "/reconnect")
{
Program.Restart();
return true;
}
else return false;
}
else return false;
}