namespace EchoHub.Server.Config; /// /// Anti-spam thresholds, bound from the "Spam" config section. Defaults are lenient enough /// that a fast typist never trips them; Mods and above are always exempt. /// public sealed class SpamOptions { /// Master switch for all spam protection. public bool Enabled { get; set; } = true; /// Max messages a user may send per window. public int MaxMessagesPerWindow { get; set; } = 8; public int WindowSeconds { get; set; } = 5; /// /// How many identical messages in a row are tolerated; the next one is rejected. /// (End-to-end encrypted rooms are naturally exempt — identical plaintext produces /// different ciphertext per message, so repeats never look identical to the server.) /// public int MaxDuplicateMessages { get; set; } = 3; /// /// Auto-mute duration once a user accumulates rejected /// sends within . 0 disables auto-mute (rejections /// still apply). The mute uses the normal timed-mute machinery, so moderators see it /// and MuteExpirationService lifts it. /// public int AutoMuteMinutes { get; set; } = 5; public int ViolationThreshold { get; set; } = 5; public int ViolationWindowMinutes { get; set; } = 5; /// /// Max *first-time* channel joins per window. Joins of /// channels the user already belongs to (reconnect/auto-join) never count, but a brand-new /// user's first connect joins every public channel at once — keep this above your public /// channel count. /// public int MaxJoinsPerWindow { get; set; } = 25; public int JoinWindowSeconds { get; set; } = 30; /// Max channel creations per window. public int MaxChannelCreatesPerWindow { get; set; } = 3; public int ChannelCreateWindowMinutes { get; set; } = 10; }