From 8eb71bd3f8e0a9531cec75248b72820c1233df3f Mon Sep 17 00:00:00 2001 From: ORelio Date: Sat, 6 Sep 2014 18:19:39 +0200 Subject: [PATCH 1/8] Fix SSL errors not properly handled Mono throws SSL errors as IOException when using SSLStream, instead of AuthenticationException. --- MinecraftClient/Protocol/ProtocolHandler.cs | 8 ++++++++ 1 file changed, 8 insertions(+) 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; From 3718dad1ee8db1024b11ce0756668f1db2031b9f Mon Sep 17 00:00:00 2001 From: ORelio Date: Sat, 6 Sep 2014 20:40:34 +0200 Subject: [PATCH 2/8] Update README.md Add a link to the README file for usage instructions --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 From 96a614b617bbccbe601b4ac5cd63144c70d7375a Mon Sep 17 00:00:00 2001 From: ORelio Date: Sun, 7 Sep 2014 15:11:39 +0200 Subject: [PATCH 3/8] Fix ThreadAbortException beign reported to the user This exception is normal when disconnecting from the server and should be ignored. --- MinecraftClient/McTcpClient.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MinecraftClient/McTcpClient.cs b/MinecraftClient/McTcpClient.cs index e2c1b6c6..2dcc0ca0 100644 --- a/MinecraftClient/McTcpClient.cs +++ b/MinecraftClient/McTcpClient.cs @@ -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 } } } From c53a696ffde5c6358f65680898bd43c29d7ce995 Mon Sep 17 00:00:00 2001 From: ORelio Date: Sun, 7 Sep 2014 15:17:47 +0200 Subject: [PATCH 4/8] Fixed %vars% not handled in chatbotlogfile Bug report by TorchRJ_ --- MinecraftClient/ChatBot.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 }); } } From ad5897fcb4652d07d9425dc5e86b20de9d417e93 Mon Sep 17 00:00:00 2001 From: ORelio Date: Sun, 7 Sep 2014 15:20:58 +0200 Subject: [PATCH 5/8] Fixed server alias not case insensitive Bug report by TorchRJ_ --- MinecraftClient/Settings.cs | 1 + 1 file changed, 1 insertion(+) 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; From 050b2985f5fa278df7590c23d060c60b4f201a37 Mon Sep 17 00:00:00 2001 From: ORelio Date: Wed, 8 Oct 2014 08:05:45 +0200 Subject: [PATCH 6/8] Fix crash on RemoteControl launching a Script List containing bots is modifier while being enumerated: crash Fixed by copying the list before enumerating Bug report by Nicconyancat --- MinecraftClient/McTcpClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MinecraftClient/McTcpClient.cs b/MinecraftClient/McTcpClient.cs index 2dcc0ca0..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); } From 0c81c703db1d42098261cf0245fca99471c6e63c Mon Sep 17 00:00:00 2001 From: ORelio Date: Wed, 8 Oct 2014 20:15:11 +0200 Subject: [PATCH 7/8] Change version number for 1.8.1 --- MinecraftClient/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") From cd0fe0e85a8a9ba445a56619e98fa13b5d9e6dd7 Mon Sep 17 00:00:00 2001 From: ORelio Date: Wed, 8 Oct 2014 20:19:46 +0200 Subject: [PATCH 8/8] Change README version number for 1.8.1 --- MinecraftClient/config/README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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!