diff --git a/NoSoliciting/Filter.cs b/NoSoliciting/Filter.cs index 2eb0c95..8576147 100644 --- a/NoSoliciting/Filter.cs +++ b/NoSoliciting/Filter.cs @@ -212,6 +212,11 @@ namespace NoSoliciting { continue; } + // ignore private listings if configured + if (!this.Plugin.Config.ConsiderPrivatePfs && (listing.searchArea & (1 << 1)) != 0) { + continue; + } + var desc = listing.Description(); string? reason = null; diff --git a/NoSoliciting/PluginConfiguration.cs b/NoSoliciting/PluginConfiguration.cs index 8cfcd7c..5d84d86 100644 --- a/NoSoliciting/PluginConfiguration.cs +++ b/NoSoliciting/PluginConfiguration.cs @@ -59,6 +59,7 @@ namespace NoSoliciting { MessageCategory.RmtContent, MessageCategory.Phishing, }; + public Dictionary> MlFilters { get; set; } = new() { [MessageCategory.RmtGil] = new HashSet { ChatType.Say, @@ -91,6 +92,8 @@ namespace NoSoliciting { public bool LogFilteredPfs { get; set; } = true; public bool LogFilteredChat { get; set; } = true; + public bool ConsiderPrivatePfs { get; set; } + public void Initialise(DalamudPluginInterface pi) { this.pi = pi ?? throw new ArgumentNullException(nameof(pi), "DalamudPluginInterface cannot be null"); this.CompileRegexes(); diff --git a/NoSoliciting/PluginUi.cs b/NoSoliciting/PluginUi.cs index d882f18..71f88df 100644 --- a/NoSoliciting/PluginUi.cs +++ b/NoSoliciting/PluginUi.cs @@ -147,6 +147,12 @@ namespace NoSoliciting { this.Plugin.Config.Save(); } + var considerPrivate = this.Plugin.Config.ConsiderPrivatePfs; + if (ImGui.Checkbox("Apply filters to private Party Finder listings", ref considerPrivate)) { + this.Plugin.Config.ConsiderPrivatePfs = considerPrivate; + this.Plugin.Config.Save(); + } + var customPf = this.Plugin.Config.CustomPFFilter; if (ImGui.Checkbox("Enable custom Party Finder filters", ref customPf)) { this.Plugin.Config.CustomPFFilter = customPf;