NoSoliciting/NoSoliciting/PluginConfiguration.cs

40 lines
1.3 KiB
C#
Raw Normal View History

2020-08-04 22:22:57 +00:00
using Dalamud.Configuration;
using Dalamud.Plugin;
using System;
using System.Collections.Generic;
2020-08-04 22:22:57 +00:00
namespace NoSoliciting {
[Serializable]
public class PluginConfiguration : IPluginConfiguration {
[NonSerialized]
2020-08-04 23:30:29 +00:00
private DalamudPluginInterface pi;
2020-08-04 22:22:57 +00:00
public int Version { get; set; } = 1;
public bool FilterChat { get; set; } = true;
public bool FilterFCRecruitments { get; set; } = false;
public bool FilterChatRPAds { get; set; } = false;
2020-08-04 22:22:57 +00:00
public bool FilterPartyFinder { get; set; } = true;
public bool FilterPartyFinderRPAds { get; set; } = false;
2020-08-04 22:22:57 +00:00
public bool AdvancedMode { get; set; } = false;
public bool CustomChatFilter { get; set; } = false;
public List<string> ChatSubstrings { get; } = new List<string>();
public List<string> ChatRegexes { get; } = new List<string>();
public bool CustomPFFilter { get; set; } = false;
public List<string> PFSubstrings { get; } = new List<string>();
public List<string> PFRegexes { get; } = new List<string>();
2020-08-04 23:30:29 +00:00
public void Initialise(DalamudPluginInterface pi) {
2020-08-04 22:22:57 +00:00
this.pi = pi ?? throw new ArgumentNullException(nameof(pi), "DalamudPluginInterface cannot be null");
}
public void Save() {
this.pi.SavePluginConfig(this);
}
}
}