From c591cb6e215ea5e762560afdae059f1d4fd7f4ec Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期五, 28 九月 2018 16:32:37 +0800
Subject: [PATCH] Merge branch 'master' into 3687天赋功能

---
 System/Chat/ChatCtrl.cs |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/System/Chat/ChatCtrl.cs b/System/Chat/ChatCtrl.cs
index c5c63cb..72cfa6b 100644
--- a/System/Chat/ChatCtrl.cs
+++ b/System/Chat/ChatCtrl.cs
@@ -277,7 +277,7 @@
         {
             isDirty = DirtyWordConfig.IsDirtWord(msg);
             msg = DirtyWordConfig.IsDirtWord(msg, '*');
-            var length = msg.Length;
+            var length = GetChatMessageLength(msg);
             if (length > CHAT_INFO_CNT)
             {
                 MessageWin.Inst.ShowFixedTip(Language.Get("L1014"));
@@ -381,6 +381,13 @@
          });
     }
 
+    int GetChatMessageLength(string message)
+    {
+        message = WordAnalysis.Color_Start_Regex.Replace(message, string.Empty);
+        message = WordAnalysis.Color_End_Regex.Replace(message, string.Empty);
+        return message.Length;
+    }
+
     bool CheckEmptyChat(string msg)
     {
         if (string.IsNullOrEmpty(msg.Replace(" ", string.Empty)))

--
Gitblit v1.8.0