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 "<user> message" and
"<*faction user>: message"
Clause added to ChatBot.cs that makes use of the new setting.
This commit is contained in:
ZizzyDizzyMC 2015-09-04 09:16:28 -04:00
parent 93aae2d467
commit 385a1f99b1
2 changed files with 5 additions and 2 deletions

View file

@ -266,7 +266,7 @@ namespace MinecraftClient
//<*Faction Someone> message //<*Faction Someone> message
//<*Faction Someone>: message //<*Faction Someone>: message
//<*Faction ~Nicknamed>: message //<*Faction ~Nicknamed>: message
if (text[0] == '<') if (text[0] == '<' && Settings.Vanilla_And_Factions_Messages_Enabled.Equals(true))
{ {
try try
{ {

View file

@ -93,6 +93,7 @@ namespace MinecraftClient
//Chat Message Enabled / Disabled. //Chat Message Enabled / Disabled.
public static bool Hero_Chat_Messages_Enabled = true; public static bool Hero_Chat_Messages_Enabled = true;
public static bool Unknown_Chat_Plugin_Messages_One_Enabled = true; public static bool Unknown_Chat_Plugin_Messages_One_Enabled = true;
public static bool Vanilla_And_Factions_Messages_Enabled = true;
//Auto Respond //Auto Respond
public static bool AutoRespond_Enabled = false; public static bool AutoRespond_Enabled = false;
@ -295,6 +296,7 @@ namespace MinecraftClient
{ {
case "herochatmessagesenabled": Hero_Chat_Messages_Enabled = str2bool(argValue); break; case "herochatmessagesenabled": Hero_Chat_Messages_Enabled = str2bool(argValue); break;
case "unknownchatpluginmessagesone": Unknown_Chat_Plugin_Messages_One_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; break;
@ -438,6 +440,7 @@ namespace MinecraftClient
+ "tpaccepteveryone=false\r\n" + "tpaccepteveryone=false\r\n"
+ "\r\n" + "\r\n"
+ "[ChatBotMessages]\r\n" + "[ChatBotMessages]\r\n"
+ "vanillaandfactionsmessages=true # Chat Formats \"<User> Message\" \"<*Faction User>: Message\" \r\n"
+ "herochatmessagesenabled=true # Chat Format is \"[Channel][Rank] User: Message\"\r\n" + "herochatmessagesenabled=true # Chat Format is \"[Channel][Rank] User: Message\"\r\n"
+ "unknownchatpluginmessagesone=true # Chat Format is \"**Faction<Rank> User : Message\"\r\n" + "unknownchatpluginmessagesone=true # Chat Format is \"**Faction<Rank> User : Message\"\r\n"
+ "\r\n" + "\r\n"