mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-22 22:18:24 +00:00
More checks
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Globalization;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace DiscordChatExporter.Gui;
|
||||
|
||||
@@ -19,9 +20,17 @@ public static class Sanctions
|
||||
if (isSkipped)
|
||||
return;
|
||||
|
||||
var locale = CultureInfo.CurrentCulture.Name;
|
||||
|
||||
var region = Registry.CurrentUser
|
||||
.OpenSubKey(@"Control Panel\International\Geo", false)?
|
||||
.GetValue("Name") as string;
|
||||
|
||||
var isSanctioned =
|
||||
CultureInfo.CurrentCulture.Name.EndsWith("-ru", StringComparison.OrdinalIgnoreCase) ||
|
||||
CultureInfo.CurrentCulture.Name.EndsWith("-by", StringComparison.OrdinalIgnoreCase);
|
||||
locale.EndsWith("-ru", StringComparison.OrdinalIgnoreCase) ||
|
||||
locale.EndsWith("-by", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(region, "ru", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(region, "by", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
if (!isSanctioned)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user