From 150a5c6f8cba6d9c5ebd24a77f97c97d4151f52b Mon Sep 17 00:00:00 2001 From: JunDao Date: Fri, 3 May 2019 19:46:53 +0800 Subject: [PATCH] fix chat color error --- chat/chatMsg.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chat/chatMsg.go b/chat/chatMsg.go index 7b68d08..0d0e4fa 100644 --- a/chat/chatMsg.go +++ b/chat/chatMsg.go @@ -92,10 +92,6 @@ func (m Message) String() string { } msg.WriteString(m.Text) - if format.Len() > 0 { - msg.WriteString("\033[0m") - } - //handle translate if m.Translate != "" { args := make([]interface{}, len(m.With)) @@ -113,5 +109,9 @@ func (m Message) String() string { msg.WriteString(Message(m.Extra[i]).String()) } } + + if format.Len() > 0 { + msg.WriteString("\033[0m") + } return msg.String() }