Variable engine done, catch bot exceptions

- %variable% variables can be declared in the INI file and used
elsewhere
- Default argument 'true' for WriteLineFormatted in ConsoleIO
- Exceptions thrown by bots no longer disconnect from the server, stack
trace is printed instead
This commit is contained in:
ORelio 2014-06-11 20:40:25 +02:00
parent 898a04a843
commit 068b87a11a
10 changed files with 111 additions and 30 deletions

View file

@ -72,7 +72,8 @@ namespace MinecraftClient
if (Settings.ConsoleTitle != "")
{
Console.Title = Settings.ConsoleTitle.Replace("%username%", "New Window");
Settings.Username = "New Window";
Console.Title = Settings.replaceVars(Settings.ConsoleTitle);
}
//Asking the user to type in missing data such as Username and Password
@ -112,7 +113,7 @@ namespace MinecraftClient
if (Settings.Password == "-")
{
ConsoleIO.WriteLineFormatted("§8You chose to run in offline mode.", false);
ConsoleIO.WriteLineFormatted("§8You chose to run in offline mode.");
result = ProtocolHandler.LoginResult.Success;
sessionID = "0";
}
@ -126,7 +127,7 @@ namespace MinecraftClient
{
if (Settings.ConsoleTitle != "")
{
Console.Title = Settings.ConsoleTitle.Replace("%username%", Settings.Username);
Console.Title = Settings.replaceVars(Settings.ConsoleTitle);
}
Console.WriteLine("Success. (session ID: " + sessionID + ')');
@ -183,7 +184,7 @@ namespace MinecraftClient
{
ConsoleIO.WriteLineFormatted("§8It appears that you are using Mono to run this program."
+ '\n' + "The first time, you have to import HTTPS certificates using:"
+ '\n' + "mozroots --import --ask-remove", true);
+ '\n' + "mozroots --import --ask-remove");
return;
}
break;