1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-19 21:11:25 +02:00

Add log color removal.

(This could already be done with the bukkit setting "log-strip-color")
This commit is contained in:
snowleo
2012-11-27 19:51:32 +01:00
parent 37be9811aa
commit d238d353c9
2 changed files with 12 additions and 2 deletions

View File

@@ -12,8 +12,8 @@ import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
import org.bukkit.entity.Player;
import org.jivesoftware.smack.Roster.SubscriptionMode;
import org.jivesoftware.smack.*;
import org.jivesoftware.smack.Roster.SubscriptionMode;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.util.StringUtils;
@@ -263,7 +263,7 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager
for (LogRecord logRecord : copy)
{
final String message = String.format("[" + logRecord.getLevel().getLocalizedName() + "] " + logRecord.getMessage(), logRecord.getParameters());
if (!XMPPManager.this.sendMessage(user, message))
if (!XMPPManager.this.sendMessage(user, Util.stripLogColorFormat(message)))
{
failedUsers.add(user);
break;