From 385a1f99b11d0ab3748d27ad934f1fe902030c52 Mon Sep 17 00:00:00 2001 From: ZizzyDizzyMC Date: Fri, 4 Sep 2015 09:16:28 -0400 Subject: [PATCH] Added another setting. Added vanillaandfactionsmessages setting that enables / disables detection of vanilla / factions public chat messages. Setting has been added to the auto-generated MinecraftClient.ini and has been commented with respective chat format of " message" and "<*faction user>: message" Clause added to ChatBot.cs that makes use of the new setting. --- MinecraftClient/ChatBot.cs | 2 +- MinecraftClient/Settings.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/MinecraftClient/ChatBot.cs b/MinecraftClient/ChatBot.cs index ebdbcc08..5d568289 100644 --- a/MinecraftClient/ChatBot.cs +++ b/MinecraftClient/ChatBot.cs @@ -266,7 +266,7 @@ namespace MinecraftClient //<*Faction Someone> message //<*Faction Someone>: message //<*Faction ~Nicknamed>: message - if (text[0] == '<') + if (text[0] == '<' && Settings.Vanilla_And_Factions_Messages_Enabled.Equals(true)) { try { diff --git a/MinecraftClient/Settings.cs b/MinecraftClient/Settings.cs index ee14b0e1..ae231d63 100644 --- a/MinecraftClient/Settings.cs +++ b/MinecraftClient/Settings.cs @@ -93,6 +93,7 @@ namespace MinecraftClient //Chat Message Enabled / Disabled. public static bool Hero_Chat_Messages_Enabled = true; public static bool Unknown_Chat_Plugin_Messages_One_Enabled = true; + public static bool Vanilla_And_Factions_Messages_Enabled = true; //Auto Respond public static bool AutoRespond_Enabled = false; @@ -295,7 +296,8 @@ namespace MinecraftClient { case "herochatmessagesenabled": Hero_Chat_Messages_Enabled = str2bool(argValue); break; case "unknownchatpluginmessagesone": Unknown_Chat_Plugin_Messages_One_Enabled = str2bool(argValue); break; - + case "vanillaandfactionsmessages": Vanilla_And_Factions_Messages_Enabled = str2bool(argValue); break; + } break; @@ -438,6 +440,7 @@ namespace MinecraftClient + "tpaccepteveryone=false\r\n" + "\r\n" + "[ChatBotMessages]\r\n" + + "vanillaandfactionsmessages=true # Chat Formats \" Message\" \"<*Faction User>: Message\" \r\n" + "herochatmessagesenabled=true # Chat Format is \"[Channel][Rank] User: Message\"\r\n" + "unknownchatpluginmessagesone=true # Chat Format is \"**Faction User : Message\"\r\n" + "\r\n"