hch
2026-01-10 7c7ee0d378cf223abd3e2f8fbf4d51fa1fcd1939
0312 区分取名和聊天的特殊符号屏蔽;其他看表配置
2个文件已修改
15 ■■■■■ 已修改文件
Main/System/Chat/ChatManager.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Utility/UIHelper.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Chat/ChatManager.cs
@@ -260,7 +260,7 @@
            return false;
        }
        if (DirtyWordConfig.IsDirtWord(info) || UIHelper.HasSpecialCharac(info)
        if (DirtyWordConfig.IsDirtWord(info) || UIHelper.HasSpecCheckChat(info)
            || DirtyNameConfig.IsDirtName(info))
        {
            errorCode = 3;
Main/Utility/UIHelper.cs
@@ -335,6 +335,8 @@
        }
    }
    // 取名验证
    static Regex s_SpecialCharacterRegex = new Regex("[()()@!#$%^&*[]|_]");
    static Regex s_AsciiCharacterRegex = new Regex("[\x00-\x1F]|[\x21-\x2F]|[\x3A-\x40]|[\x5B-\x60]|[\x7B-\x7E]");
    public static bool HasSpecialCharac(string str)
@@ -350,6 +352,17 @@
        return false;
    }
    //聊天
    static Regex s_AsciiCharacterRegexChat = new Regex("[\x00-\x1F]");
    public static bool HasSpecCheckChat(string str)
    {
        if (s_AsciiCharacterRegexChat.IsMatch(str))
        {
            return true;
        }
        return false;
    }
    // 检查字符串是不是纯整数
    public static bool IsNumeric(string input)
    {