feat: ignore private pfs unless told otherwise
This commit is contained in:
parent
acd8f04937
commit
450415f6cc
|
@ -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;
|
||||
|
|
|
@ -59,6 +59,7 @@ namespace NoSoliciting {
|
|||
MessageCategory.RmtContent,
|
||||
MessageCategory.Phishing,
|
||||
};
|
||||
|
||||
public Dictionary<MessageCategory, HashSet<ChatType>> MlFilters { get; set; } = new() {
|
||||
[MessageCategory.RmtGil] = new HashSet<ChatType> {
|
||||
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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue