From c2d52cc6b0495d8aa66fa4d8ec191a2438b5f300 Mon Sep 17 00:00:00 2001 From: goat Date: Sat, 29 Jun 2024 00:08:10 +0200 Subject: [PATCH] remove built-in RMT filtering --- .../Internal/DalamudConfiguration.cs | 5 ----- Dalamud/Game/ChatHandlers.cs | 16 ---------------- .../Windows/Settings/Tabs/SettingsTabGeneral.cs | 6 ------ 3 files changed, 27 deletions(-) diff --git a/Dalamud/Configuration/Internal/DalamudConfiguration.cs b/Dalamud/Configuration/Internal/DalamudConfiguration.cs index 4e79b3b46..6bff5720f 100644 --- a/Dalamud/Configuration/Internal/DalamudConfiguration.cs +++ b/Dalamud/Configuration/Internal/DalamudConfiguration.cs @@ -345,11 +345,6 @@ internal sealed class DalamudConfiguration : IInternalDisposableService /// Gets or sets a value indicating whether or not the user has seen the profiles tutorial. /// public bool ProfilesHasSeenTutorial { get; set; } = false; - - /// - /// Gets or sets a value indicating whether or not Dalamud RMT filtering should be disabled. - /// - public bool DisableRmtFiltering { get; set; } /// /// Gets or sets the order of DTR elements, by title. diff --git a/Dalamud/Game/ChatHandlers.cs b/Dalamud/Game/ChatHandlers.cs index 0ac20826c..73e924f2d 100644 --- a/Dalamud/Game/ChatHandlers.cs +++ b/Dalamud/Game/ChatHandlers.cs @@ -31,10 +31,6 @@ internal class ChatHandlers : IServiceType { private static readonly ModuleLog Log = new("CHATHANDLER"); - private readonly Regex rmtRegex = new( - @"4KGOLD|We have sufficient stock|VPK\.OM|[Gg]il for free|[Gg]il [Cc]heap|5GOLD|www\.so9\.com|Fast & Convenient|Cheap & Safety Guarantee|【Code|A O A U E|igfans|4KGOLD\.COM|Cheapest Gil with|pvp and bank on google|Selling Cheap GIL|ff14mogstation\.com|Cheap Gil 1000k|gilsforyou|server 1000K =|gils_selling|E A S Y\.C O M|bonus code|mins delivery guarantee|Sell cheap|Salegm\.com|cheap Mog|Off Code:|FF14Mog.com|使用する5%オ|[Oo][Ff][Ff] [Cc]ode( *)[:;]|offers Fantasia", - RegexOptions.Compiled | RegexOptions.IgnoreCase); - private readonly Dictionary retainerSaleRegexes = new() { { @@ -100,18 +96,6 @@ internal class ChatHandlers : IServiceType { var textVal = message.TextValue; - if (!this.configuration.DisableRmtFiltering) - { - var matched = this.rmtRegex.IsMatch(textVal); - if (matched) - { - // This seems to be a RMT ad - let's not show it - Log.Debug("Handled RMT ad: " + message.TextValue); - isHandled = true; - return; - } - } - if (this.configuration.BadWords != null && this.configuration.BadWords.Any(x => !string.IsNullOrEmpty(x) && textVal.Contains(x))) { diff --git a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabGeneral.cs b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabGeneral.cs index d33bfacfb..c991907ec 100644 --- a/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabGeneral.cs +++ b/Dalamud/Interface/Internal/Windows/Settings/Tabs/SettingsTabGeneral.cs @@ -68,12 +68,6 @@ public class SettingsTabGeneral : SettingsTab c => c.DoButtonsSystemMenu, (v, c) => c.DoButtonsSystemMenu = v), - new SettingsEntry( - Loc.Localize("DalamudSettingsEnableRmtFiltering", "Enable RMT Filtering"), - Loc.Localize("DalamudSettingsEnableRmtFilteringMsgHint", "Enable Dalamud's built-in RMT ad filtering."), - c => !c.DisableRmtFiltering, - (v, c) => c.DisableRmtFiltering = !v), - new GapSettingsEntry(5), new SettingsEntry(