mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-13 02:38:27 -04:00
Restructured folders and project names, ci should be fixed
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Threading;
|
||||
using Discord;
|
||||
using NadekoBot.Common.Collections;
|
||||
using NadekoBot.Core.Services.Database.Models;
|
||||
|
||||
namespace NadekoBot.Modules.Administration.Common
|
||||
{
|
||||
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 ConcurrentHashSet<IGuildUser>();
|
||||
}
|
||||
|
||||
public class AntiSpamStats
|
||||
{
|
||||
public AntiSpamSetting AntiSpamSettings { get; set; }
|
||||
public ConcurrentDictionary<ulong, UserSpamStats> UserStats { get; set; }
|
||||
= new ConcurrentDictionary<ulong, UserSpamStats>();
|
||||
}
|
||||
|
||||
public class AntiAltStats
|
||||
{
|
||||
private readonly AntiAltSetting _setting;
|
||||
public PunishmentAction Action => _setting.Action;
|
||||
public int ActionDurationMinutes => _setting.ActionDurationMinutes;
|
||||
public ulong? RoleId => _setting.RoleId;
|
||||
public TimeSpan MinAge => _setting.MinAge;
|
||||
|
||||
private int _counter = 0;
|
||||
public int Counter => _counter;
|
||||
|
||||
public AntiAltStats(AntiAltSetting setting)
|
||||
{
|
||||
_setting = setting;
|
||||
}
|
||||
|
||||
public void Increment() => Interlocked.Increment(ref _counter);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user