Remove colors of player messages from log messages

This commit is contained in:
Evenprime 2012-02-10 19:34:10 +01:00
parent df80b3c66a
commit 9642cbe2f4
2 changed files with 3 additions and 2 deletions

View File

@ -23,7 +23,8 @@ public abstract class ChatCheck extends Check {
public String getParameter(ParameterName wildcard, NoCheatPlayer player) {
if(wildcard == ParameterName.TEXT)
return getData(player.getDataStore()).message;
// Filter colors from the players message when logging
return getData(player.getDataStore()).message.replaceAll("\302\247.", "").replaceAll("\247.", "");
else
return super.getParameter(wildcard, player);
}

View File

@ -24,7 +24,7 @@ public class ColorCheck extends ChatCheck {
if(filter) {
// Remove color codes
data.message = data.message.replaceAll("\302\247", "").replaceAll("\247", "");
data.message = data.message.replaceAll("\302\247.", "").replaceAll("\247.", "");
}
}