diff --git a/MinecraftClient/ChatBot.cs b/MinecraftClient/ChatBot.cs index 08933c3a..4d94ad03 100644 --- a/MinecraftClient/ChatBot.cs +++ b/MinecraftClient/ChatBot.cs @@ -273,18 +273,19 @@ namespace MinecraftClient public static void LogToConsole(string text) { ConsoleIO.WriteLineFormatted("§8[BOT] " + text); + string logfile = Settings.expandVars(Settings.chatbotLogFile); - if (!String.IsNullOrEmpty(Settings.chatbotLogFile)) + if (!String.IsNullOrEmpty(logfile)) { - if (!File.Exists(Settings.chatbotLogFile)) + if (!File.Exists(logfile)) { - try { Directory.CreateDirectory(Path.GetDirectoryName(Settings.chatbotLogFile)); } + try { Directory.CreateDirectory(Path.GetDirectoryName(logfile)); } catch { return; /* Invalid path or access denied */ } - try { File.WriteAllText(Settings.chatbotLogFile, ""); } + try { File.WriteAllText(logfile, ""); } catch { return; /* Invalid file name or access denied */ } } - File.AppendAllLines(Settings.chatbotLogFile, new string[] { getTimestamp() + ' ' + text }); + File.AppendAllLines(logfile, new string[] { getTimestamp() + ' ' + text }); } } diff --git a/MinecraftClient/McTcpClient.cs b/MinecraftClient/McTcpClient.cs index e2c1b6c6..ceaedfb9 100644 --- a/MinecraftClient/McTcpClient.cs +++ b/MinecraftClient/McTcpClient.cs @@ -299,7 +299,7 @@ namespace MinecraftClient public void OnTextReceived(string text) { ConsoleIO.WriteLineFormatted(text, false); - foreach (ChatBot bot in bots) + foreach (ChatBot bot in new List(bots)) bot.GetText(text); } @@ -349,7 +349,11 @@ namespace MinecraftClient } catch (Exception e) { - ConsoleIO.WriteLineFormatted("§8Got error from " + bots[i].ToString() + ": " + e.ToString()); + if (!(e is ThreadAbortException)) + { + ConsoleIO.WriteLineFormatted("§8Got error from " + bots[i].ToString() + ": " + e.ToString()); + } + else throw; //ThreadAbortException should not be caught } } } diff --git a/MinecraftClient/Program.cs b/MinecraftClient/Program.cs index df814e01..c65a6ab3 100644 --- a/MinecraftClient/Program.cs +++ b/MinecraftClient/Program.cs @@ -27,7 +27,7 @@ namespace MinecraftClient static void Main(string[] args) { - Console.WriteLine("Console Client for MC 1.4.6 to 1.8.0 - v" + Version + " - By ORelio & Contributors"); + Console.WriteLine("Console Client for MC 1.4.6 to 1.8.1 - v" + Version + " - By ORelio & Contributors"); //Basic Input/Output ? if (args.Length >= 1 && args[args.Length - 1] == "BasicIO") diff --git a/MinecraftClient/Protocol/ProtocolHandler.cs b/MinecraftClient/Protocol/ProtocolHandler.cs index 059a60a2..ce3a704b 100644 --- a/MinecraftClient/Protocol/ProtocolHandler.cs +++ b/MinecraftClient/Protocol/ProtocolHandler.cs @@ -183,6 +183,14 @@ namespace MinecraftClient.Protocol { return LoginResult.SSLError; } + catch (System.IO.IOException e) + { + if (e.Message.Contains("authentication")) + { + return LoginResult.SSLError; + } + else return LoginResult.OtherError; + } catch { return LoginResult.OtherError; diff --git a/MinecraftClient/Settings.cs b/MinecraftClient/Settings.cs index 327b2438..6ccbe85e 100644 --- a/MinecraftClient/Settings.cs +++ b/MinecraftClient/Settings.cs @@ -429,6 +429,7 @@ namespace MinecraftClient public static bool setServerIP(string server) { + server = server.ToLower(); string[] sip = server.Split(':'); string host = sip[0]; short port = 25565; diff --git a/MinecraftClient/config/README.txt b/MinecraftClient/config/README.txt index 6e1ee675..2a07bdd2 100644 --- a/MinecraftClient/config/README.txt +++ b/MinecraftClient/config/README.txt @@ -1,5 +1,5 @@ ================================================================== - Minecraft Client v1.8.0 for Minecraft 1.4.6 to 1.8.0 - By ORelio + Minecraft Client v1.8.1 for Minecraft 1.4.6 to 1.8.0 - By ORelio ================================================================== Thanks for dowloading Minecraft Console Client! diff --git a/README.md b/README.md index f5c03ad1..7464b1dc 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ send commands and receive text messages in a fast and easy way without having to ##How to use -Downloads, help and more info at http://www.minecraftforum.net/topic/1314800-/ +Downloads, help and more info available on the [Minecraft Forum thread](http://www.minecraftforum.net/topic/1314800-/)'s first post.
+Alternatively, you can take a look at the [README](https://github.com/ORelio/Minecraft-Console-Client/blob/master/MinecraftClient/config/README.txt) file from the latest stable binary release. ##License