mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-02 05:43:40 +01:00
remove built-in RMT filtering
This commit is contained in:
parent
daf6c3e17f
commit
c2d52cc6b0
3 changed files with 0 additions and 27 deletions
|
|
@ -346,11 +346,6 @@ internal sealed class DalamudConfiguration : IInternalDisposableService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ProfilesHasSeenTutorial { get; set; } = false;
|
public bool ProfilesHasSeenTutorial { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether or not Dalamud RMT filtering should be disabled.
|
|
||||||
/// </summary>
|
|
||||||
public bool DisableRmtFiltering { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the order of DTR elements, by title.
|
/// Gets or sets the order of DTR elements, by title.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,6 @@ internal class ChatHandlers : IServiceType
|
||||||
{
|
{
|
||||||
private static readonly ModuleLog Log = new("CHATHANDLER");
|
private static readonly ModuleLog Log = new("CHATHANDLER");
|
||||||
|
|
||||||
private readonly Regex rmtRegex = new(
|
|
||||||
@"4KGOLD|We have sufficient stock|VPK\.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<ClientLanguage, Regex[]> retainerSaleRegexes = new()
|
private readonly Dictionary<ClientLanguage, Regex[]> retainerSaleRegexes = new()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
|
@ -100,18 +96,6 @@ internal class ChatHandlers : IServiceType
|
||||||
{
|
{
|
||||||
var textVal = message.TextValue;
|
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 &&
|
if (this.configuration.BadWords != null &&
|
||||||
this.configuration.BadWords.Any(x => !string.IsNullOrEmpty(x) && textVal.Contains(x)))
|
this.configuration.BadWords.Any(x => !string.IsNullOrEmpty(x) && textVal.Contains(x)))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -68,12 +68,6 @@ public class SettingsTabGeneral : SettingsTab
|
||||||
c => c.DoButtonsSystemMenu,
|
c => c.DoButtonsSystemMenu,
|
||||||
(v, c) => c.DoButtonsSystemMenu = v),
|
(v, c) => c.DoButtonsSystemMenu = v),
|
||||||
|
|
||||||
new SettingsEntry<bool>(
|
|
||||||
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 GapSettingsEntry(5),
|
||||||
|
|
||||||
new SettingsEntry<bool>(
|
new SettingsEntry<bool>(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue