mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 10:18:27 -04:00
Reorganizing module and submodule folders
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
#nullable disable
|
||||
using NadekoBot.Services.Database.Models;
|
||||
|
||||
namespace NadekoBot.Modules.Administration;
|
||||
|
||||
public enum ProtectionType
|
||||
{
|
||||
Raiding,
|
||||
Spamming,
|
||||
Alting
|
||||
}
|
||||
|
||||
public class AntiRaidStats
|
||||
{
|
||||
public AntiRaidSetting AntiRaidSettings { get; set; }
|
||||
public int UsersCount { get; set; }
|
||||
public ConcurrentHashSet<IGuildUser> RaidUsers { get; set; } = new();
|
||||
}
|
||||
|
||||
public class AntiSpamStats
|
||||
{
|
||||
public AntiSpamSetting AntiSpamSettings { get; set; }
|
||||
public ConcurrentDictionary<ulong, UserSpamStats> UserStats { get; set; } = new();
|
||||
}
|
||||
|
||||
public class AntiAltStats
|
||||
{
|
||||
public PunishmentAction Action
|
||||
=> _setting.Action;
|
||||
|
||||
public int ActionDurationMinutes
|
||||
=> _setting.ActionDurationMinutes;
|
||||
|
||||
public ulong? RoleId
|
||||
=> _setting.RoleId;
|
||||
|
||||
public TimeSpan MinAge
|
||||
=> _setting.MinAge;
|
||||
|
||||
public int Counter
|
||||
=> _counter;
|
||||
|
||||
private readonly AntiAltSetting _setting;
|
||||
|
||||
private int _counter;
|
||||
|
||||
public AntiAltStats(AntiAltSetting setting)
|
||||
=> _setting = setting;
|
||||
|
||||
public void Increment()
|
||||
=> Interlocked.Increment(ref _counter);
|
||||
}
|
Reference in New Issue
Block a user