mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Added a new PM regex
Added [someone @ me] message so that remote control could be used on more servers. Added back Hero Chat Messages with a default config option of; herochatmessagesenabled=false which safely disables it for everyone and has to be explicitly enabled for it to goof anything up. How this happened was me downloading the "source" from minecraft forums and modifying that source then trying to merge it back to the main github fork of mine.
This commit is contained in:
parent
3e2622fbb7
commit
88c9605e94
3 changed files with 25 additions and 0 deletions
BIN
.vs/MinecraftClient/v14/.suo
Normal file
BIN
.vs/MinecraftClient/v14/.suo
Normal file
Binary file not shown.
|
|
@ -197,6 +197,17 @@ namespace MinecraftClient
|
||||||
return IsValidName(sender);
|
return IsValidName(sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Detect Modified server messages. /m
|
||||||
|
//[Someone @ me] message
|
||||||
|
else if (text[0] == '[' && tmp.Length > 3 && tmp[1] == "@"
|
||||||
|
&& (tmp[2] == "me]" || tmp[2] == "moi]")) //'me' is replaced by 'moi' in french servers
|
||||||
|
{
|
||||||
|
message = text.Substring(tmp[0].Length + 4 + tmp[2].Length + 0);
|
||||||
|
sender = tmp[0].Substring(1);
|
||||||
|
if (sender[0] == '~') { sender = sender.Substring(1); }
|
||||||
|
return IsValidName(sender);
|
||||||
|
}
|
||||||
|
|
||||||
//Detect Essentials (Bukkit) /me messages with some custom prefix
|
//Detect Essentials (Bukkit) /me messages with some custom prefix
|
||||||
//[Prefix] [Someone -> me] message
|
//[Prefix] [Someone -> me] message
|
||||||
//[Prefix] [~Someone -> me] message
|
//[Prefix] [~Someone -> me] message
|
||||||
|
|
@ -231,6 +242,17 @@ namespace MinecraftClient
|
||||||
return IsValidName(sender);
|
return IsValidName(sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Detect HeroChat Messages
|
||||||
|
//[Channel] [Rank] User: Message
|
||||||
|
else if (text.StartsWith("[") && text.Contains(':') && tmp.Length > 2 && Settings.Hero_Chat_Messages_Enabled.Equals(true))
|
||||||
|
{
|
||||||
|
int name_end = text.IndexOf(':');
|
||||||
|
int name_start = text.Substring(0, name_end).LastIndexOf(']') + 2;
|
||||||
|
sender = text.Substring(name_start, name_end - name_start);
|
||||||
|
message = text.Substring(name_end + 2);
|
||||||
|
return IsValidName(sender);
|
||||||
|
}
|
||||||
|
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
catch (IndexOutOfRangeException) { return false; }
|
catch (IndexOutOfRangeException) { return false; }
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ namespace MinecraftClient
|
||||||
public static bool RemoteCtrl_Enabled = false;
|
public static bool RemoteCtrl_Enabled = false;
|
||||||
public static bool RemoteCtrl_AutoTpaccept = true;
|
public static bool RemoteCtrl_AutoTpaccept = true;
|
||||||
public static bool RemoteCtrl_AutoTpaccept_Everyone = false;
|
public static bool RemoteCtrl_AutoTpaccept_Everyone = false;
|
||||||
|
public static bool Hero_Chat_Messages_Enabled = false;
|
||||||
|
|
||||||
//Auto Respond
|
//Auto Respond
|
||||||
public static bool AutoRespond_Enabled = false;
|
public static bool AutoRespond_Enabled = false;
|
||||||
|
|
@ -282,6 +283,7 @@ namespace MinecraftClient
|
||||||
case "enabled": RemoteCtrl_Enabled = str2bool(argValue); break;
|
case "enabled": RemoteCtrl_Enabled = str2bool(argValue); break;
|
||||||
case "autotpaccept": RemoteCtrl_AutoTpaccept = str2bool(argValue); break;
|
case "autotpaccept": RemoteCtrl_AutoTpaccept = str2bool(argValue); break;
|
||||||
case "tpaccepteveryone": RemoteCtrl_AutoTpaccept_Everyone = str2bool(argValue); break;
|
case "tpaccepteveryone": RemoteCtrl_AutoTpaccept_Everyone = str2bool(argValue); break;
|
||||||
|
case "herochatmessagesenabled": Hero_Chat_Messages_Enabled = str2bool(argValue); break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -422,6 +424,7 @@ namespace MinecraftClient
|
||||||
+ "enabled=false\r\n"
|
+ "enabled=false\r\n"
|
||||||
+ "autotpaccept=true\r\n"
|
+ "autotpaccept=true\r\n"
|
||||||
+ "tpaccepteveryone=false\r\n"
|
+ "tpaccepteveryone=false\r\n"
|
||||||
|
+ "herochatmessagesenabled=false\r\n"
|
||||||
+ "\r\n"
|
+ "\r\n"
|
||||||
+ "[AutoRespond]\r\n"
|
+ "[AutoRespond]\r\n"
|
||||||
+ "enabled=false\r\n"
|
+ "enabled=false\r\n"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue