Skip to content

Commit

Permalink
Update Appender.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Niix-Dan authored Jul 7, 2024
1 parent 1c5de23 commit 2a47ef1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/niix/dan/consolediscord/Appender.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ public void run() {
try {
String msg = messages;
if(!msg.isEmpty()) {
msg = msg.replaceAll("\033\\[[;\\d]*m", "");
msg = msg.replaceAll("(?:[&§][a-fk-oru0-9])", "");
//msg = msg.replaceAll("\033\\[[;\\d]*m", "");
msg = msg.replaceAll("(?:[&§][a-fk-oru0-9])", ""); // Color codes filter
msg = msg.replaceAll("\\p{C}", ""); // Removing ESC char


if(msg.length() >= 2000) {
String messageTooLong = plugin.getConfig().getString("Messages.Discord.MessageLimit", "\n\nThis message exceeded discord's 2,000 character limit. To see the complete log look in the console!");
Expand Down

0 comments on commit 2a47ef1

Please # to comment.