mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-07 21:58:06 -05:00
Namespace Update (SLC/Data Ignored)
This commit is contained in:
parent
95523885b8
commit
c4b33c361a
@ -5,17 +5,8 @@ using SharedLibraryCore.Database.Models;
|
||||
|
||||
namespace IW4MAdmin.Application.Alerts;
|
||||
|
||||
/// <summary>
|
||||
/// extension method helper class to allow building of alerts
|
||||
/// </summary>
|
||||
public static class AlertExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// builds basic alert for user with provided category
|
||||
/// </summary>
|
||||
/// <param name="client">client to build the alert for</param>
|
||||
/// <param name="type">alert category</param>
|
||||
/// <returns></returns>
|
||||
public static Alert.AlertState BuildAlert(this EFClient client, Alert.AlertCategory? type = null)
|
||||
{
|
||||
return new Alert.AlertState
|
||||
@ -25,72 +16,36 @@ public static class AlertExtensions
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// sets the category for an existing alert
|
||||
/// </summary>
|
||||
/// <param name="state">existing alert</param>
|
||||
/// <param name="category">new category</param>
|
||||
/// <returns></returns>
|
||||
public static Alert.AlertState WithCategory(this Alert.AlertState state, Alert.AlertCategory category)
|
||||
{
|
||||
state.Category = category;
|
||||
return state;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// sets the alert type for an existing alert
|
||||
/// </summary>
|
||||
/// <param name="state">existing alert</param>
|
||||
/// <param name="type">new type</param>
|
||||
/// <returns></returns>
|
||||
public static Alert.AlertState OfType(this Alert.AlertState state, string type)
|
||||
{
|
||||
state.Type = type;
|
||||
return state;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// sets the message for an existing alert
|
||||
/// </summary>
|
||||
/// <param name="state">existing alert</param>
|
||||
/// <param name="message">new message</param>
|
||||
/// <returns></returns>
|
||||
public static Alert.AlertState WithMessage(this Alert.AlertState state, string message)
|
||||
{
|
||||
state.Message = message;
|
||||
return state;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// sets the expiration duration for an existing alert
|
||||
/// </summary>
|
||||
/// <param name="state">existing alert</param>
|
||||
/// <param name="expiration">duration before expiration</param>
|
||||
/// <returns></returns>
|
||||
public static Alert.AlertState ExpiresIn(this Alert.AlertState state, TimeSpan expiration)
|
||||
{
|
||||
state.ExpiresAt = DateTime.Now.Add(expiration);
|
||||
return state;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// sets the source for an existing alert
|
||||
/// </summary>
|
||||
/// <param name="state">existing alert</param>
|
||||
/// <param name="source">new source</param>
|
||||
/// <returns></returns>
|
||||
public static Alert.AlertState FromSource(this Alert.AlertState state, string source)
|
||||
{
|
||||
state.Source = source;
|
||||
return state;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// sets the alert source to the provided client
|
||||
/// </summary>
|
||||
/// <param name="state">existing alert</param>
|
||||
/// <param name="client">new client</param>
|
||||
/// <returns></returns>
|
||||
public static Alert.AlertState FromClient(this Alert.AlertState state, EFClient client)
|
||||
{
|
||||
state.Source = client.Name.StripColors();
|
||||
|
@ -4,7 +4,6 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
|
||||
<PackageId>RaidMax.IW4MAdmin.Application</PackageId>
|
||||
<Version>2020.0.0.0</Version>
|
||||
<Authors>RaidMax</Authors>
|
||||
<Company>Forever None</Company>
|
||||
|
@ -1,13 +1,4 @@
|
||||
using IW4MAdmin.Application.IO;
|
||||
using IW4MAdmin.Application.Misc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Exceptions;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
@ -19,25 +10,34 @@ using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Abstractions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Serilog.Context;
|
||||
using static SharedLibraryCore.Database.Models.EFClient;
|
||||
using Data.Models;
|
||||
using Data.Models.Server;
|
||||
using Humanizer;
|
||||
using IW4MAdmin.Application.Alerts;
|
||||
using IW4MAdmin.Application.Commands;
|
||||
using IW4MAdmin.Application.IO;
|
||||
using IW4MAdmin.Application.Misc;
|
||||
using IW4MAdmin.Application.Plugin.Script;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Serilog.Context;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Alerts;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Events.Management;
|
||||
using SharedLibraryCore.Events.Server;
|
||||
using SharedLibraryCore.Exceptions;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.Interfaces.Events;
|
||||
using static SharedLibraryCore.Database.Models.EFClient;
|
||||
using static Data.Models.Client.EFClient;
|
||||
|
||||
namespace IW4MAdmin
|
||||
namespace IW4MAdmin.Application
|
||||
{
|
||||
public class IW4MServer : Server
|
||||
{
|
||||
|
@ -15,7 +15,6 @@ using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.QueryHelper;
|
||||
using SharedLibraryCore.Repositories;
|
||||
using SharedLibraryCore.Services;
|
||||
using Stats.Dtos;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@ -33,18 +32,17 @@ using IW4MAdmin.Application.Localization;
|
||||
using IW4MAdmin.Application.Plugin;
|
||||
using IW4MAdmin.Application.Plugin.Script;
|
||||
using IW4MAdmin.Application.QueryHelpers;
|
||||
using IW4MAdmin.Plugins.Stats.Client;
|
||||
using IW4MAdmin.Plugins.Stats.Client.Abstractions;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
using IW4MAdmin.Plugins.Stats.Dtos;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using IW4MAdmin.WebfrontCore.QueryHelpers.Models;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
using IW4MAdmin.Plugins.Stats.Client.Abstractions;
|
||||
using IW4MAdmin.Plugins.Stats.Client;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Refit;
|
||||
using SharedLibraryCore.Interfaces.Events;
|
||||
using Stats.Client.Abstractions;
|
||||
using Stats.Client;
|
||||
using Stats.Config;
|
||||
using Stats.Helpers;
|
||||
using WebfrontCore.QueryHelpers.Models;
|
||||
|
||||
namespace IW4MAdmin.Application
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ILogger = SharedLibraryCore.Interfaces.ILogger;
|
||||
|
||||
namespace IW4MAdmin.Application
|
||||
namespace IW4MAdmin.Application.Misc
|
||||
{
|
||||
[Obsolete]
|
||||
public class Logger : ILogger
|
||||
|
@ -1,9 +1,7 @@
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace IW4MAdmin.Application
|
||||
namespace IW4MAdmin.Application.Misc
|
||||
{
|
||||
/// <summary>
|
||||
/// implementatin of IPageList that supports basic
|
||||
|
@ -129,7 +129,7 @@ namespace IW4MAdmin.Application.Plugin.Script
|
||||
typeof(Encoding).Assembly,
|
||||
typeof(CancellationTokenSource).Assembly,
|
||||
typeof(Data.Models.Client.EFClient).Assembly,
|
||||
typeof(IW4MAdmin.Plugins.Stats.Plugin).Assembly
|
||||
typeof(Plugins.Stats.Plugin).Assembly
|
||||
})
|
||||
.CatchClrExceptions()
|
||||
.AddObjectConverter(new PermissionLevelToStringConverter()));
|
||||
|
@ -291,7 +291,7 @@ public class ScriptPluginV2 : IPluginV2
|
||||
typeof(ScriptPluginExtensions), typeof(LoggerExtensions))
|
||||
.AllowClr(typeof(System.Net.Http.HttpClient).Assembly, typeof(EFClient).Assembly,
|
||||
typeof(Utilities).Assembly, typeof(Encoding).Assembly, typeof(CancellationTokenSource).Assembly,
|
||||
typeof(Data.Models.Client.EFClient).Assembly, typeof(IW4MAdmin.Plugins.Stats.Plugin).Assembly, typeof(ScriptPluginWebRequest).Assembly)
|
||||
typeof(Data.Models.Client.EFClient).Assembly, typeof(Plugins.Stats.Plugin).Assembly, typeof(ScriptPluginWebRequest).Assembly)
|
||||
.CatchClrExceptions()
|
||||
.AddObjectConverter(new EnumsToStringConverter()));
|
||||
|
||||
|
@ -6,14 +6,14 @@ using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Abstractions;
|
||||
using Data.Models;
|
||||
using IW4MAdmin.WebfrontCore.Permissions;
|
||||
using IW4MAdmin.WebfrontCore.QueryHelpers.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using WebfrontCore.Permissions;
|
||||
using WebfrontCore.QueryHelpers.Models;
|
||||
using EFClient = Data.Models.Client.EFClient;
|
||||
|
||||
namespace IW4MAdmin.Application.QueryHelpers;
|
||||
|
@ -6,6 +6,7 @@
|
||||
<LangVersion>Latest</LangVersion>
|
||||
<Configurations>Debug;Release;Prerelease</Configurations>
|
||||
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
|
||||
<RootNamespace>IW4MAdmin.Plugins.AutoMessageFeed</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -1,13 +1,13 @@
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.SyndicationFeed.Rss;
|
||||
using System.Xml;
|
||||
using Microsoft.SyndicationFeed;
|
||||
using System.Collections.Generic;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.SyndicationFeed;
|
||||
using Microsoft.SyndicationFeed.Rss;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.Interfaces.Events;
|
||||
|
||||
namespace IW4MAdmin.Plugins.AutoMessageFeed;
|
||||
|
@ -1,5 +1,5 @@
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace IW4MAdmin.Plugins.LiveRadar.Configuration;
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Linq;
|
||||
using IW4MAdmin.Plugins.LiveRadar.Configuration;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Linq;
|
||||
using IW4MAdmin.Plugins.LiveRadar.Configuration;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace IW4MAdmin.Plugins.LiveRadar.Web.Controllers
|
||||
namespace IW4MAdmin.Plugins.LiveRadar.Controllers
|
||||
{
|
||||
public class RadarController : BaseController
|
||||
{
|
||||
|
@ -13,6 +13,7 @@
|
||||
<ApplicationIcon />
|
||||
<OutputType>Library</OutputType>
|
||||
<StartupObject />
|
||||
<RootNamespace>IW4MAdmin.Plugins.LiveRadar</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -1,5 +1,4 @@
|
||||
using SharedLibraryCore;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
@ -10,6 +9,7 @@ using IW4MAdmin.Plugins.LiveRadar.Configuration;
|
||||
using IW4MAdmin.Plugins.LiveRadar.Events;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Events.Game;
|
||||
using SharedLibraryCore.Events.Server;
|
||||
|
@ -1,6 +1,6 @@
|
||||
using Data.Models;
|
||||
using SharedLibraryCore;
|
||||
using IW4MAdmin.Plugins.LiveRadar.Events;
|
||||
using SharedLibraryCore;
|
||||
|
||||
// ReSharper disable CompareOfFloatsByEqualityOperator
|
||||
#pragma warning disable CS0659
|
||||
|
@ -1,10 +1,10 @@
|
||||
using SharedLibraryCore;
|
||||
using System.Threading.Tasks;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Commands;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Threading.Tasks;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Login.Commands
|
||||
{
|
||||
|
@ -12,6 +12,7 @@
|
||||
<Product>Login Plugin for IW4MAdmin</Product>
|
||||
<Configurations>Debug;Release;Prerelease</Configurations>
|
||||
<LangVersion>Latest</LangVersion>
|
||||
<RootNamespace>IW4MAdmin.Plugins.Login</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
@ -13,6 +13,7 @@
|
||||
<Copyright>2018</Copyright>
|
||||
<Configurations>Debug;Release;Prerelease</Configurations>
|
||||
<LangVersion>Latest</LangVersion>
|
||||
<RootNamespace>IW4MAdmin.Plugins.ProfanityDeterment</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -1,15 +1,14 @@
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using Data.Models;
|
||||
using Data.Models.Client;
|
||||
using Data.Models.Client.Stats;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore;
|
||||
using Stats.Config;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Cheat
|
||||
|
@ -1,6 +1,6 @@
|
||||
using SharedLibraryCore;
|
||||
using System;
|
||||
using System;
|
||||
using Data.Models;
|
||||
using SharedLibraryCore;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Cheat
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using Stats.Config;
|
||||
using System;
|
||||
using System;
|
||||
using Data.Models;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Cheat
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using IW4MAdmin.Plugins.Stats.Client.Game;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace Stats.Client.Abstractions
|
||||
namespace IW4MAdmin.Plugins.Stats.Client.Abstractions
|
||||
{
|
||||
public interface IHitInfoBuilder
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Stats.Client.Abstractions
|
||||
namespace IW4MAdmin.Plugins.Stats.Client.Abstractions
|
||||
{
|
||||
public interface IServerDistributionCalculator
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using Data.Models;
|
||||
using Stats.Client.Game;
|
||||
using IW4MAdmin.Plugins.Stats.Client.Game;
|
||||
|
||||
namespace Stats.Client.Abstractions;
|
||||
namespace IW4MAdmin.Plugins.Stats.Client.Abstractions;
|
||||
|
||||
public interface IWeaponNameParser
|
||||
{
|
||||
|
@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Stats.Client.Game
|
||||
namespace IW4MAdmin.Plugins.Stats.Client.Game
|
||||
{
|
||||
public class AttachmentInfo
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Data.Models;
|
||||
using Stats.Client.Game;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Client.Game
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Stats.Client.Game
|
||||
namespace IW4MAdmin.Plugins.Stats.Client.Game
|
||||
{
|
||||
public class WeaponInfo
|
||||
{
|
||||
|
@ -18,8 +18,6 @@ using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Events;
|
||||
using SharedLibraryCore.Events.Game;
|
||||
using SharedLibraryCore.Events.Management;
|
||||
using Stats.Client.Abstractions;
|
||||
using Stats.Client.Game;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Client;
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Data.Models;
|
||||
using IW4MAdmin.Plugins.Stats.Client.Abstractions;
|
||||
using IW4MAdmin.Plugins.Stats.Client.Game;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using Stats.Client.Abstractions;
|
||||
using Stats.Client.Game;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
namespace Stats.Client;
|
||||
namespace IW4MAdmin.Plugins.Stats.Client;
|
||||
|
||||
public class HitInfoBuilder : IHitInfoBuilder
|
||||
{
|
||||
|
@ -6,16 +6,14 @@ using System.Threading.Tasks;
|
||||
using Data.Abstractions;
|
||||
using Data.Models.Client;
|
||||
using Data.Models.Client.Stats;
|
||||
using IW4MAdmin.Plugins.Stats;
|
||||
using IW4MAdmin.Plugins.Stats.Client.Abstractions;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using Stats.Client.Abstractions;
|
||||
using Stats.Config;
|
||||
using Stats.Helpers;
|
||||
|
||||
namespace Stats.Client
|
||||
namespace IW4MAdmin.Plugins.Stats.Client
|
||||
{
|
||||
public class ServerDistributionCalculator : IServerDistributionCalculator
|
||||
{
|
||||
|
@ -1,13 +1,13 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Stats.Client.Abstractions;
|
||||
using Stats.Client.Game;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Data.Models;
|
||||
using Stats.Config;
|
||||
using IW4MAdmin.Plugins.Stats.Client.Abstractions;
|
||||
using IW4MAdmin.Plugins.Stats.Client.Game;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
namespace Stats.Client
|
||||
namespace IW4MAdmin.Plugins.Stats.Client
|
||||
{
|
||||
public class WeaponNameParser : IWeaponNameParser
|
||||
{
|
||||
|
@ -1,15 +1,15 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using SharedLibraryCore;
|
||||
using System.Collections.Generic;
|
||||
using Data.Abstractions;
|
||||
using Data.Models.Client.Stats;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using Stats.Config;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Commands;
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using SharedLibraryCore;
|
||||
using System.Collections.Generic;
|
||||
using Data.Abstractions;
|
||||
using Data.Models.Client.Stats;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
|
@ -5,6 +5,7 @@ using Data.Abstractions;
|
||||
using Data.Models.Client;
|
||||
using Data.Models.Client.Stats;
|
||||
using IW4MAdmin.Plugins.Stats.Cheat;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore;
|
||||
@ -12,7 +13,7 @@ using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
namespace Stats.Commands
|
||||
namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
{
|
||||
public class ResetAnticheatMetricsCommand : Command
|
||||
{
|
||||
@ -38,11 +39,10 @@ namespace Stats.Commands
|
||||
try
|
||||
{
|
||||
var clientDetection =
|
||||
gameEvent.Target.GetAdditionalProperty<Detection>(IW4MAdmin.Plugins.Stats.Helpers.StatManager
|
||||
gameEvent.Target.GetAdditionalProperty<Detection>(StatManager
|
||||
.CLIENT_DETECTIONS_KEY);
|
||||
var clientStats =
|
||||
gameEvent.Target.GetAdditionalProperty<EFClientStatistics>(IW4MAdmin.Plugins.Stats.Helpers
|
||||
.StatManager.CLIENT_STATS_KEY);
|
||||
gameEvent.Target.GetAdditionalProperty<EFClientStatistics>(StatManager.CLIENT_STATS_KEY);
|
||||
|
||||
if (clientStats != null)
|
||||
{
|
||||
|
@ -1,13 +1,13 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Abstractions;
|
||||
using Data.Models.Client.Stats;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using SharedLibraryCore;
|
||||
using System.Collections.Generic;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using EFClient = Data.Models.Client.EFClient;
|
||||
|
@ -1,14 +1,14 @@
|
||||
using SharedLibraryCore;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Abstractions;
|
||||
using Data.Models.Client.Stats;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Commands;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using static IW4MAdmin.Plugins.Stats.Cheat.Detection;
|
||||
using static SharedLibraryCore.Server;
|
||||
|
||||
namespace Stats.Config
|
||||
namespace IW4MAdmin.Plugins.Stats.Config
|
||||
{
|
||||
public class AnticheatConfiguration
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace Stats.Config
|
||||
namespace IW4MAdmin.Plugins.Stats.Config
|
||||
{
|
||||
public class DistributionConfiguration
|
||||
{
|
||||
|
@ -1,12 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Data.Models;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using static IW4MAdmin.Plugins.Stats.Cheat.Detection;
|
||||
|
||||
namespace Stats.Config
|
||||
namespace IW4MAdmin.Plugins.Stats.Config
|
||||
{
|
||||
public class StatsConfiguration : IBaseConfiguration
|
||||
{
|
||||
|
@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Config
|
||||
namespace IW4MAdmin.Plugins.Stats.Config
|
||||
{
|
||||
public class StreakMessageConfiguration
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using Data.Models;
|
||||
|
||||
namespace Stats.Config
|
||||
namespace IW4MAdmin.Plugins.Stats.Config
|
||||
{
|
||||
public class WeaponNameParserConfiguration
|
||||
{
|
||||
|
@ -3,7 +3,7 @@ using Data.Models.Client;
|
||||
using Data.Models.Client.Stats;
|
||||
using SharedLibraryCore.Dtos;
|
||||
|
||||
namespace Stats.Dtos
|
||||
namespace IW4MAdmin.Plugins.Stats.Dtos
|
||||
{
|
||||
public class AdvancedStatsInfo
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using SharedLibraryCore.QueryHelper;
|
||||
using System;
|
||||
using System;
|
||||
using SharedLibraryCore.QueryHelper;
|
||||
|
||||
namespace Stats.Dtos
|
||||
namespace IW4MAdmin.Plugins.Stats.Dtos
|
||||
{
|
||||
public class ChatSearchQuery : ClientPaginationRequest
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace Stats.Dtos
|
||||
namespace IW4MAdmin.Plugins.Stats.Dtos
|
||||
{
|
||||
public class StatsInfoRequest
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Stats.Dtos
|
||||
namespace IW4MAdmin.Plugins.Stats.Dtos
|
||||
{
|
||||
public class StatsInfoResult
|
||||
{
|
||||
|
@ -1,9 +1,8 @@
|
||||
using SharedLibraryCore.Dtos;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using SharedLibraryCore.Dtos;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Web.Dtos
|
||||
namespace IW4MAdmin.Plugins.Stats.Dtos
|
||||
{
|
||||
public class TopStatsInfo : SharedInfo
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
using SharedLibraryCore;
|
||||
using System.Collections.Generic;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Collections.Generic;
|
||||
using SharedLibraryCore.Events.Game;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using EventGeneratorCallback = System.ValueTuple<string, string,
|
||||
System.Func<string, SharedLibraryCore.Interfaces.IEventParserConfiguration,
|
||||
SharedLibraryCore.GameEvent,
|
||||
|
@ -3,9 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Data.Models.Client.Stats;
|
||||
using Microsoft.EntityFrameworkCore.Internal;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using Stats.Dtos;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats
|
||||
{
|
||||
|
@ -6,16 +6,15 @@ using Data.Abstractions;
|
||||
using Data.Models;
|
||||
using Data.Models.Client;
|
||||
using Data.Models.Client.Stats;
|
||||
using IW4MAdmin.Plugins.Stats;
|
||||
using IW4MAdmin.Plugins.Stats.Dtos;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using Stats.Dtos;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
namespace Stats.Helpers
|
||||
namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
{
|
||||
public class AdvancedClientStatsResourceQueryHelper : IResourceQueryHelper<StatsInfoRequest, AdvancedStatsInfo>
|
||||
{
|
||||
|
@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
||||
using Data.Abstractions;
|
||||
using Data.Models.Client;
|
||||
using Data.Models.Server;
|
||||
using IW4MAdmin.Plugins.Stats.Dtos;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore;
|
||||
@ -12,10 +13,9 @@ using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Dtos.Meta.Responses;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using Stats.Dtos;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
namespace Stats.Helpers
|
||||
namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
{
|
||||
/// <summary>
|
||||
/// implementation of IResourceQueryHelper
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace Stats.Helpers
|
||||
namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
{
|
||||
public class MigrationHelper
|
||||
{
|
||||
|
@ -1,11 +1,11 @@
|
||||
using SharedLibraryCore;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Data.Models.Client;
|
||||
using Data.Models.Client.Stats;
|
||||
using Data.Models.Server;
|
||||
using SharedLibraryCore;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
{
|
||||
|
@ -1,10 +1,4 @@
|
||||
using IW4MAdmin.Plugins.Stats.Cheat;
|
||||
using IW4MAdmin.Plugins.Stats.Web.Dtos;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
@ -19,11 +13,16 @@ using Data.Models.Client;
|
||||
using Data.Models.Client.Stats;
|
||||
using Data.Models.Server;
|
||||
using Humanizer.Localisation;
|
||||
using IW4MAdmin.Plugins.Stats.Cheat;
|
||||
using IW4MAdmin.Plugins.Stats.Client.Abstractions;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
using IW4MAdmin.Plugins.Stats.Dtos;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Stats.Client.Abstractions;
|
||||
using Stats.Config;
|
||||
using Stats.Helpers;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using static IW4MAdmin.Plugins.Stats.Cheat.Detection;
|
||||
using EFClient = SharedLibraryCore.Database.Models.EFClient;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
@ -1,14 +1,14 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using Stats.Dtos;
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Abstractions;
|
||||
using Data.Models.Client.Stats;
|
||||
using IW4MAdmin.Plugins.Stats.Dtos;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace Stats.Helpers
|
||||
namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
{
|
||||
/// <summary>
|
||||
/// implementation for IResourceQueryHelper
|
||||
|
@ -1,5 +1,5 @@
|
||||
using System.Linq;
|
||||
using Stats.Config;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Helpers;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using Data.Models.Client.Stats;
|
||||
|
||||
namespace Stats.Helpers
|
||||
namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
{
|
||||
public static class WeaponNameExtensions
|
||||
{
|
||||
|
@ -1,12 +1,4 @@
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos.Meta.Responses;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.QueryHelper;
|
||||
using Stats.Dtos;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
@ -15,15 +7,22 @@ using Data.Abstractions;
|
||||
using Data.Models;
|
||||
using Data.Models.Client.Stats;
|
||||
using Data.Models.Server;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using IW4MAdmin.Plugins.Stats.Client.Abstractions;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
using IW4MAdmin.Plugins.Stats.Dtos;
|
||||
using IW4MAdmin.Plugins.Stats.Events;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos.Meta.Responses;
|
||||
using SharedLibraryCore.Events.Game;
|
||||
using SharedLibraryCore.Events.Management;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.Interfaces.Events;
|
||||
using Stats.Client.Abstractions;
|
||||
using Stats.Config;
|
||||
using SharedLibraryCore.QueryHelper;
|
||||
using EFClient = SharedLibraryCore.Database.Models.EFClient;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats;
|
||||
|
@ -14,6 +14,7 @@
|
||||
<Configurations>Debug;Release;Prerelease</Configurations>
|
||||
<LangVersion>Latest</LangVersion>
|
||||
<IsPackable>false</IsPackable>
|
||||
<RootNamespace>IW4MAdmin.Plugins.Stats</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -13,6 +13,7 @@
|
||||
<Copyright>2018</Copyright>
|
||||
<Configurations>Debug;Release;Prerelease</Configurations>
|
||||
<LangVersion>Latest</LangVersion>
|
||||
<RootNamespace>IW4MAdmin.Plugins.Welcome</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Linq;
|
||||
|
||||
namespace WebfrontCore.Controllers.API;
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers.API;
|
||||
|
||||
public class ApiController : BaseController
|
||||
{
|
||||
|
@ -1,23 +1,23 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using IW4MAdmin.WebfrontCore.Controllers.API.Dtos;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Events.Management;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.Services;
|
||||
using WebfrontCore.Controllers.API.Dtos;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
namespace WebfrontCore.Controllers.API
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers.API
|
||||
{
|
||||
/// <summary>
|
||||
/// api controller for client operations
|
||||
|
@ -1,7 +1,7 @@
|
||||
using SharedLibraryCore.Dtos;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using SharedLibraryCore.Dtos;
|
||||
|
||||
namespace WebfrontCore.Controllers.API.Dtos
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers.API.Dtos
|
||||
{
|
||||
public class FindClientResponse
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace WebfrontCore.Controllers.API.Dtos;
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers.API.Dtos;
|
||||
|
||||
public class InfoResponse
|
||||
{
|
||||
|
@ -3,12 +3,12 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models;
|
||||
using IW4MAdmin.WebfrontCore.Controllers.API.Dtos;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using WebfrontCore.Controllers.API.Dtos;
|
||||
|
||||
namespace WebfrontCore.Controllers.API;
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers.API;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace WebfrontCore.Controllers.API.Models
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers.API.Models
|
||||
{
|
||||
public class CommandRequest
|
||||
{
|
||||
|
@ -1,10 +1,10 @@
|
||||
using System.Threading.Tasks;
|
||||
using IW4MAdmin.WebfrontCore.QueryHelpers.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using WebfrontCore.QueryHelpers.Models;
|
||||
|
||||
namespace WebfrontCore.Controllers.API;
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers.API;
|
||||
|
||||
[Route("api/[controller]")]
|
||||
public class PenaltyController : BaseController
|
||||
|
@ -3,14 +3,14 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using IW4MAdmin.WebfrontCore.Controllers.API.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using WebfrontCore.Controllers.API.Models;
|
||||
|
||||
namespace WebfrontCore.Controllers.API
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers.API
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
|
@ -1,14 +1,14 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using IW4MAdmin.Plugins.Stats.Dtos;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using Stats.Dtos;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
namespace StatsWeb.API
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers.API
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/stats")]
|
||||
|
@ -2,7 +2,7 @@
|
||||
using FluentValidation;
|
||||
using SharedLibraryCore.Dtos;
|
||||
|
||||
namespace WebfrontCore.Controllers.API.Validation
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers.API.Validation
|
||||
{
|
||||
/// <summary>
|
||||
/// validator for FindClientRequest
|
||||
|
@ -1,12 +1,12 @@
|
||||
using System.Linq;
|
||||
using IW4MAdmin.WebfrontCore.Extensions;
|
||||
using IW4MAdmin.WebfrontCore.ViewModels;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using WebfrontCore.Extensions;
|
||||
using WebfrontCore.ViewModels;
|
||||
|
||||
namespace WebfrontCore.Controllers
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers
|
||||
{
|
||||
public class AboutController : BaseController
|
||||
{
|
||||
|
@ -1,16 +1,16 @@
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Events.Management;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace WebfrontCore.Controllers
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers
|
||||
{
|
||||
public class AccountController : BaseController
|
||||
{
|
||||
|
@ -7,6 +7,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models;
|
||||
using Data.Models.Client;
|
||||
using IW4MAdmin.WebfrontCore.ViewModels;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@ -17,9 +18,8 @@ using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Dtos.Meta.Responses;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using WebfrontCore.ViewModels;
|
||||
|
||||
namespace WebfrontCore.Controllers
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers
|
||||
{
|
||||
public class ActionController : BaseController
|
||||
{
|
||||
|
@ -1,12 +1,12 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using System.Threading.Tasks;
|
||||
using IW4MAdmin.WebfrontCore.QueryHelpers.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Threading.Tasks;
|
||||
using WebfrontCore.QueryHelpers.Models;
|
||||
|
||||
namespace WebfrontCore.Controllers
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers
|
||||
{
|
||||
public class AdminController : BaseController
|
||||
{
|
||||
|
@ -1,23 +1,23 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
using IW4MAdmin.WebfrontCore.Permissions;
|
||||
using IW4MAdmin.WebfrontCore.QueryHelpers.Models;
|
||||
using IW4MAdmin.WebfrontCore.ViewComponents;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Dtos.Meta.Responses;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.QueryHelper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models;
|
||||
using SharedLibraryCore.Services;
|
||||
using Stats.Config;
|
||||
using WebfrontCore.Permissions;
|
||||
using WebfrontCore.QueryHelpers.Models;
|
||||
using WebfrontCore.ViewComponents;
|
||||
|
||||
namespace WebfrontCore.Controllers
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers.Client
|
||||
{
|
||||
public class ClientController : BaseController
|
||||
{
|
||||
|
@ -1,13 +1,13 @@
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using IW4MAdmin.Plugins.Stats.Dtos;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using Stats.Dtos;
|
||||
|
||||
namespace WebfrontCore.Controllers
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers.Client
|
||||
{
|
||||
[Route("clientstatistics")]
|
||||
public class ClientStatisticsController : BaseController
|
||||
|
@ -1,25 +1,24 @@
|
||||
using IW4MAdmin.Plugins.Stats;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Dtos.Meta.Responses;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using Stats.Dtos;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
using Data.Abstractions;
|
||||
using Stats.Config;
|
||||
using WebfrontCore.QueryHelpers.Models;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
using IW4MAdmin.Plugins.Stats.Dtos;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using IW4MAdmin.WebfrontCore.QueryHelpers.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Dtos.Meta.Responses;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Web.StatsWeb.Controllers
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers.Client.Legacy
|
||||
{
|
||||
public class StatsController : BaseController
|
||||
{
|
||||
|
@ -1,21 +1,21 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using IW4MAdmin.WebfrontCore.ViewModels;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Configuration.Attributes;
|
||||
using SharedLibraryCore.Configuration.Validation;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using WebfrontCore.ViewModels;
|
||||
|
||||
namespace WebfrontCore.Controllers
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
public class ConfigurationController : BaseController
|
||||
|
@ -1,11 +1,11 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebfrontCore.Controllers
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers
|
||||
{
|
||||
public class ConsoleController : BaseController
|
||||
{
|
||||
|
@ -1,18 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Diagnostics;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models;
|
||||
using Microsoft.AspNetCore.Diagnostics;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
namespace WebfrontCore.Controllers
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers
|
||||
{
|
||||
public class HomeController : BaseController
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace WebfrontCore.Controllers;
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers;
|
||||
|
||||
public class InteractionController : BaseController
|
||||
{
|
||||
|
@ -1,15 +1,11 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Abstractions;
|
||||
using Data.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace WebfrontCore.Controllers
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers
|
||||
{
|
||||
public class PenaltyController : BaseController
|
||||
{
|
||||
|
@ -1,16 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Linq;
|
||||
using Data.Models;
|
||||
using Data.Models.Client.Stats;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using WebfrontCore.ViewModels;
|
||||
using IW4MAdmin.WebfrontCore.ViewModels;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace WebfrontCore.Controllers
|
||||
namespace IW4MAdmin.WebfrontCore.Controllers
|
||||
{
|
||||
public class ServerController : BaseController
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using SharedLibraryCore.Configuration;
|
||||
|
||||
namespace WebfrontCore.Extensions
|
||||
namespace IW4MAdmin.WebfrontCore.Extensions
|
||||
{
|
||||
public static class WebfrontExtensions
|
||||
{
|
||||
|
@ -1,19 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models.Client;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Commands;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using static SharedLibraryCore.GameEvent;
|
||||
|
||||
namespace WebfrontCore.Middleware
|
||||
namespace IW4MAdmin.WebfrontCore.Middleware
|
||||
{
|
||||
/// <summary>
|
||||
/// Facilitates the removal of identity claims when client is demoted
|
||||
|
@ -1,10 +1,10 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
||||
|
||||
namespace WebfrontCore.Middleware
|
||||
namespace IW4MAdmin.WebfrontCore.Middleware
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the middleware functioning to whitelist connection from
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace WebfrontCore.Permissions;
|
||||
namespace IW4MAdmin.WebfrontCore.Permissions;
|
||||
|
||||
public enum WebfrontEntity
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace WebfrontCore
|
||||
namespace IW4MAdmin.WebfrontCore
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
|
@ -6,13 +6,13 @@ using System.Threading.Tasks;
|
||||
using Data.Abstractions;
|
||||
using Data.Models;
|
||||
using Data.Models.Client;
|
||||
using IW4MAdmin.WebfrontCore.QueryHelpers.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using WebfrontCore.QueryHelpers.Models;
|
||||
|
||||
namespace WebfrontCore.QueryHelpers;
|
||||
namespace IW4MAdmin.WebfrontCore.QueryHelpers;
|
||||
|
||||
public class BanInfoResourceQueryHelper : IResourceQueryHelper<BanInfoRequest, BanInfo>
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Data.Models;
|
||||
|
||||
namespace WebfrontCore.QueryHelpers.Models;
|
||||
namespace IW4MAdmin.WebfrontCore.QueryHelpers.Models;
|
||||
|
||||
public class BanInfo
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using SharedLibraryCore.Dtos;
|
||||
|
||||
namespace WebfrontCore.QueryHelpers.Models;
|
||||
namespace IW4MAdmin.WebfrontCore.QueryHelpers.Models;
|
||||
|
||||
public class BanInfoRequest : PaginationRequest
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using Stats.Dtos;
|
||||
using IW4MAdmin.Plugins.Stats.Dtos;
|
||||
|
||||
namespace WebfrontCore.QueryHelpers.Models;
|
||||
namespace IW4MAdmin.WebfrontCore.QueryHelpers.Models;
|
||||
|
||||
public class ChatResourceRequest : ChatSearchQuery
|
||||
{
|
||||
|
@ -3,7 +3,7 @@ using Data.Models;
|
||||
using Data.Models.Client;
|
||||
using SharedLibraryCore.QueryHelper;
|
||||
|
||||
namespace WebfrontCore.QueryHelpers.Models;
|
||||
namespace IW4MAdmin.WebfrontCore.QueryHelpers.Models;
|
||||
|
||||
public class ClientResourceRequest : ClientPaginationRequest
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
using Data.Models;
|
||||
using Data.Models.Client;
|
||||
|
||||
namespace WebfrontCore.QueryHelpers.Models;
|
||||
namespace IW4MAdmin.WebfrontCore.QueryHelpers.Models;
|
||||
|
||||
public class ClientResourceResponse
|
||||
{
|
||||
|
@ -1,20 +1,4 @@
|
||||
using System;
|
||||
using FluentValidation;
|
||||
using FluentValidation.AspNetCore;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc.Razor;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Dtos.Meta.Responses;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.Services;
|
||||
using Stats.Dtos;
|
||||
using Stats.Helpers;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@ -24,13 +8,29 @@ using System.Threading.RateLimiting;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Abstractions;
|
||||
using Data.Helpers;
|
||||
using FluentValidation;
|
||||
using FluentValidation.AspNetCore;
|
||||
using IW4MAdmin.Plugins.Stats.Dtos;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using IW4MAdmin.WebfrontCore.Controllers.API.Validation;
|
||||
using IW4MAdmin.WebfrontCore.Middleware;
|
||||
using IW4MAdmin.WebfrontCore.QueryHelpers;
|
||||
using IW4MAdmin.WebfrontCore.QueryHelpers.Models;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc.Razor;
|
||||
using Microsoft.AspNetCore.RateLimiting;
|
||||
using WebfrontCore.Controllers.API.Validation;
|
||||
using WebfrontCore.Middleware;
|
||||
using WebfrontCore.QueryHelpers;
|
||||
using WebfrontCore.QueryHelpers.Models;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Dtos.Meta.Responses;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.Services;
|
||||
|
||||
namespace WebfrontCore
|
||||
namespace IW4MAdmin.WebfrontCore
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
@ -51,8 +51,7 @@ namespace WebfrontCore
|
||||
|
||||
services.AddStackPolicy(options =>
|
||||
{
|
||||
options.MaxConcurrentRequests =
|
||||
int.Parse(Environment.GetEnvironmentVariable("MaxConcurrentRequests") ?? "1");
|
||||
options.MaxConcurrentRequests = int.Parse(Environment.GetEnvironmentVariable("MaxConcurrentRequests") ?? "1");
|
||||
options.RequestQueueLimit = int.Parse(Environment.GetEnvironmentVariable("RequestQueueLimit") ?? "1");
|
||||
});
|
||||
|
||||
@ -150,6 +149,14 @@ namespace WebfrontCore
|
||||
serviceProvider.GetRequiredService<ApplicationConfiguration>().WebfrontConnectionWhitelist);
|
||||
}
|
||||
|
||||
app.UseRateLimiter(new RateLimiterOptions()
|
||||
.AddConcurrencyLimiter("concurrencyPolicy", (options) =>
|
||||
{
|
||||
options.PermitLimit = 2;
|
||||
options.QueueLimit = 25;
|
||||
options.QueueProcessingOrder = QueueProcessingOrder.NewestFirst;
|
||||
}));
|
||||
|
||||
app.UseStaticFiles();
|
||||
app.UseAuthentication();
|
||||
app.UseCors("AllowAll");
|
||||
|
@ -2,13 +2,13 @@
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using Data.Models.Client;
|
||||
using IW4MAdmin.WebfrontCore.Permissions;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Razor.TagHelpers;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using WebfrontCore.Permissions;
|
||||
|
||||
namespace WebfrontCore.TagHelpers;
|
||||
namespace IW4MAdmin.WebfrontCore.TagHelpers;
|
||||
|
||||
[HtmlTargetElement("has-permission")]
|
||||
public class HasPermission : TagHelper
|
||||
|
@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace WebfrontCore.ViewComponents
|
||||
namespace IW4MAdmin.WebfrontCore.ViewComponents
|
||||
{
|
||||
public class PenaltyListViewComponent : ViewComponent
|
||||
{
|
||||
|
@ -1,19 +1,19 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Dtos.Meta.Responses;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.QueryHelper;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using IW4MAdmin.WebfrontCore.Permissions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using WebfrontCore.Permissions;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Dtos.Meta.Responses;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.QueryHelper;
|
||||
|
||||
namespace WebfrontCore.ViewComponents
|
||||
namespace IW4MAdmin.WebfrontCore.ViewComponents
|
||||
{
|
||||
public class ProfileMetaListViewComponent : ViewComponent
|
||||
{
|
||||
|
@ -1,14 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using System.Linq;
|
||||
using Data.Models;
|
||||
using Data.Models.Client.Stats;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Dtos;
|
||||
|
||||
namespace WebfrontCore.ViewComponents
|
||||
namespace IW4MAdmin.WebfrontCore.ViewComponents
|
||||
{
|
||||
public class ServerListViewComponent : ViewComponent
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user