mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -04:00
Fix double emotes (control characters, such as single music note) being incorrectly trimmed to a single emote by chat regex.
This commit is contained in:
parent
4a31395a06
commit
e2720274d3
@ -215,10 +215,7 @@ namespace MCGalaxy {
|
||||
}
|
||||
|
||||
void Player_PlayerChat(Player p, string message) {
|
||||
if (String.IsNullOrEmpty(message.Trim())) {
|
||||
Player.Message(p, "You cannot send that message");
|
||||
return;
|
||||
}
|
||||
if (String.IsNullOrEmpty(message.Trim())) return;
|
||||
if (!IsConnected()) return;
|
||||
|
||||
string name = Server.ircPlayerTitles ? p.FullName : p.group.prefix + p.ColoredName;
|
||||
|
@ -991,7 +991,7 @@ try { SendBlockchange(pos1.x, pos1.y, pos1.z, Block.waterstill); } catch { }
|
||||
return;
|
||||
}
|
||||
|
||||
text = Regex.Replace(text, @"\s\s+", " ");
|
||||
text = Regex.Replace(text, " +", " ");
|
||||
if ( text.Any(ch => ch == '&') ) {
|
||||
Leave("Illegal character in chat message!", true);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user