diff --git a/MinecraftClient/ChatBots/ChatLog.cs b/MinecraftClient/ChatBots/ChatLog.cs index 54468253..38faec79 100644 --- a/MinecraftClient/ChatBots/ChatLog.cs +++ b/MinecraftClient/ChatBots/ChatLog.cs @@ -53,6 +53,11 @@ namespace MinecraftClient.ChatBots saveChat = false; break; } + if (String.IsNullOrEmpty(file) || file.IndexOfAny(Path.GetInvalidPathChars()) >= 0) + { + LogToConsole("Path '" + file + "' contains invalid characters."); + UnloadBot(); + } } public static MessageFilter str2filter(string filtername)