From 846e7677f1e36234618cc5186a75f923bb1ac538 Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Wed, 17 Apr 2024 17:19:40 -0400 Subject: [PATCH] Support blocking commenters based on their non-ASCII name --- TwitchDownloaderCore/ChatRenderer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TwitchDownloaderCore/ChatRenderer.cs b/TwitchDownloaderCore/ChatRenderer.cs index 6fa35f64..31f74560 100644 --- a/TwitchDownloaderCore/ChatRenderer.cs +++ b/TwitchDownloaderCore/ChatRenderer.cs @@ -196,7 +196,8 @@ private void RemoveRestrictedComments(List comments) { foreach (var username in renderOptions.IgnoreUsersArray) { - if (username.Equals(comments[i].commenter.name, StringComparison.OrdinalIgnoreCase)) + if (username.Equals(comments[i].commenter.name, StringComparison.OrdinalIgnoreCase) // ASCII login name + || (username.Any(IsNotAscii) && username.Equals(comments[i].commenter.display_name, StringComparison.InvariantCultureIgnoreCase))) // Potentially non-ASCII display name { comments.RemoveAt(i); i--;