From 1abb46b8cabe8614da298409f644ea37859bae98 Mon Sep 17 00:00:00 2001 From: ZizzyDizzyMC Date: Thu, 3 Sep 2015 23:59:15 -0400 Subject: [PATCH] Added / Cleaned Enable features of Chat Messages --- MinecraftClient/ChatBot.cs | 3 ++- MinecraftClient/Settings.cs | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/MinecraftClient/ChatBot.cs b/MinecraftClient/ChatBot.cs index d7a7e412..ebdbcc08 100644 --- a/MinecraftClient/ChatBot.cs +++ b/MinecraftClient/ChatBot.cs @@ -306,7 +306,8 @@ namespace MinecraftClient && text.IndexOf('*') < text.IndexOf('<') && text.IndexOf('<') < text.IndexOf('>') && text.IndexOf('>') < text.IndexOf(' ') - && text.IndexOf(' ') < text.IndexOf(':')) + && text.IndexOf(' ') < text.IndexOf(':') + && Settings.Unknown_Chat_Plugin_Messages_One_Enabled.Equals(true)) { string prefix = tmp[0]; string user = tmp[1]; diff --git a/MinecraftClient/Settings.cs b/MinecraftClient/Settings.cs index 27240440..a22ec296 100644 --- a/MinecraftClient/Settings.cs +++ b/MinecraftClient/Settings.cs @@ -89,7 +89,10 @@ namespace MinecraftClient public static bool RemoteCtrl_Enabled = false; public static bool RemoteCtrl_AutoTpaccept = true; public static bool RemoteCtrl_AutoTpaccept_Everyone = false; + + //Chat Message Enabled / Disabled. public static bool Hero_Chat_Messages_Enabled = true; + public static bool Unknown_Chat_Plugin_Messages_One_Enabled = true; //Auto Respond public static bool AutoRespond_Enabled = false; @@ -100,7 +103,7 @@ namespace MinecraftClient private static readonly Dictionary> Accounts = new Dictionary>(); private static readonly Dictionary> Servers = new Dictionary>(); - private enum ParseMode { Default, Main, AppVars, Proxy, AntiAFK, Hangman, Alerts, ChatLog, AutoRelog, ScriptScheduler, RemoteControl, AutoRespond }; + private enum ParseMode { Default, Main, AppVars, Proxy, AntiAFK, Hangman, Alerts, ChatLog, AutoRelog, ScriptScheduler, RemoteControl, ChatBotMessages, AutoRespond }; /// /// Load settings from the give INI file @@ -287,6 +290,15 @@ namespace MinecraftClient } break; + case ParseMode.ChatBotMessages: + switch (argName.ToLower()) + { + case "herochatmessagesenabled": Hero_Chat_Messages_Enabled = str2bool(argValue); break; + case "unknownchatpluginmessagesone": Unknown_Chat_Plugin_Messages_One_Enabled = str2bool(argValue); break; + + } + break; + case ParseMode.Proxy: switch (argName.ToLower()) { @@ -424,7 +436,9 @@ namespace MinecraftClient + "enabled=false\r\n" + "autotpaccept=true\r\n" + "tpaccepteveryone=false\r\n" + + "[ChatBotMessages]\r\n" + "herochatmessagesenabled=true\r\n" + + "unknownchatpluginmessagesone=true\r\n" + "\r\n" + "[AutoRespond]\r\n" + "enabled=false\r\n"