Several fixes

Fix Alerts bot not displaying several occurences in a row
Fix Script bot not displaying in console what it is performing
Fix IOException not caught when connection is lost
This commit is contained in:
ORelio 2014-07-01 14:10:29 +02:00
parent d295f3b181
commit cfb313fa01
5 changed files with 13 additions and 2 deletions

View file

@ -72,7 +72,7 @@ namespace MinecraftClient.ChatBots
Console.ForegroundColor = ConsoleColor.White;
//Will be used for text displaying
string[] temp = comp.Split(alert.Split(','), StringSplitOptions.RemoveEmptyEntries);
string[] temp = comp.Split(alert.Split(','), StringSplitOptions.None);
int p = 0;
//Special case : alert in the beginning of the text

View file

@ -106,6 +106,7 @@ namespace MinecraftClient.ChatBots
{
sleepticks = 0; Update(); //Unknown command : process next line immediately
}
else LogToConsole(instruction_line);
break;
}
}

View file

@ -72,7 +72,15 @@ namespace MinecraftClient
public static string[] getArgs(string command)
{
return getArg(command).Split(' ');
string[] args = getArg(command).Split(' ');
if (args.Length == 1 && args[0] == "")
{
return new string[] { };
}
else
{
return args;
}
}
}
}

View file

@ -593,6 +593,7 @@ namespace MinecraftClient.Protocol.Handlers
return true;
}
catch (SocketException) { return false; }
catch (System.IO.IOException) { return false; }
}
public bool SendRespawnPacket()

View file

@ -422,6 +422,7 @@ namespace MinecraftClient.Protocol.Handlers
return true;
}
catch (SocketException) { return false; }
catch (System.IO.IOException) { return false; }
}
/// <summary>