mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Merge pull request #46 from ORelio/Indev
Merging changes from Indev for 1.8.1 release
This commit is contained in:
commit
1c28270377
7 changed files with 25 additions and 10 deletions
|
|
@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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<ChatBot>(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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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!
|
||||
|
|
|
|||
|
|
@ -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.<br/>
|
||||
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue