From a6991f0dc97a4d5c28b4b6fe6d5cd8ccc5ea81a0 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期五, 28 九月 2018 11:36:33 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
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