diff --git a/HellionChat/Configuration.cs b/HellionChat/Configuration.cs index d8bfd55..920caa3 100755 --- a/HellionChat/Configuration.cs +++ b/HellionChat/Configuration.cs @@ -64,12 +64,30 @@ public class Configuration : IPluginConfiguration .PrivacyDefaults .DefaultPersistUnknownChannels; + // F3.2: dedup unknown-ChatType warnings so a chatty filter doesn't spam + // the log every frame. NonSerialized so the warning fires once per + // runtime, not once-ever-per-install. + [NonSerialized] + private readonly HashSet _warnedUnknownChannels = new(); + public bool IsAllowedForStorage(ChatType type) { if (!PrivacyFilterEnabled) return true; if (PrivacyPersistChannels.Contains(type)) return true; + + // F3.2: log first occurrence so a new patch's ChatType doesn't drop + // off the radar. Failsafe still applies via PrivacyPersistUnknownChannels. + if (_warnedUnknownChannels.Add(type)) + { + Plugin.Log.Warning( + "PrivacyFilter: unknown ChatType {Type} — falling back to PrivacyPersistUnknownChannels={Persist}.", + type, + PrivacyPersistUnknownChannels + ); + } + return PrivacyPersistUnknownChannels; }