diff --git a/Application/Alerts/AlertExtensions.cs b/Application/Alerts/AlertExtensions.cs index b164fa57..b90db826 100644 --- a/Application/Alerts/AlertExtensions.cs +++ b/Application/Alerts/AlertExtensions.cs @@ -5,17 +5,8 @@ using SharedLibraryCore.Database.Models; namespace IW4MAdmin.Application.Alerts; -/// -/// extension method helper class to allow building of alerts -/// public static class AlertExtensions { - /// - /// builds basic alert for user with provided category - /// - /// client to build the alert for - /// alert category - /// public static Alert.AlertState BuildAlert(this EFClient client, Alert.AlertCategory? type = null) { return new Alert.AlertState @@ -25,72 +16,36 @@ public static class AlertExtensions }; } - /// - /// sets the category for an existing alert - /// - /// existing alert - /// new category - /// public static Alert.AlertState WithCategory(this Alert.AlertState state, Alert.AlertCategory category) { state.Category = category; return state; } - /// - /// sets the alert type for an existing alert - /// - /// existing alert - /// new type - /// public static Alert.AlertState OfType(this Alert.AlertState state, string type) { state.Type = type; return state; } - /// - /// sets the message for an existing alert - /// - /// existing alert - /// new message - /// public static Alert.AlertState WithMessage(this Alert.AlertState state, string message) { state.Message = message; return state; } - /// - /// sets the expiration duration for an existing alert - /// - /// existing alert - /// duration before expiration - /// public static Alert.AlertState ExpiresIn(this Alert.AlertState state, TimeSpan expiration) { state.ExpiresAt = DateTime.Now.Add(expiration); return state; } - /// - /// sets the source for an existing alert - /// - /// existing alert - /// new source - /// public static Alert.AlertState FromSource(this Alert.AlertState state, string source) { state.Source = source; return state; } - /// - /// sets the alert source to the provided client - /// - /// existing alert - /// new client - /// public static Alert.AlertState FromClient(this Alert.AlertState state, EFClient client) { state.Source = client.Name.StripColors(); diff --git a/Application/Application.csproj b/Application/Application.csproj index cfade8ce..980d436e 100644 --- a/Application/Application.csproj +++ b/Application/Application.csproj @@ -4,7 +4,6 @@ Exe net8.0 false - RaidMax.IW4MAdmin.Application 2020.0.0.0 RaidMax Forever None diff --git a/Application/IW4MServer.cs b/Application/IW4MServer.cs index 129f239c..02f1d076 100644 --- a/Application/IW4MServer.cs +++ b/Application/IW4MServer.cs @@ -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 { diff --git a/Application/Main.cs b/Application/Main.cs index 0362688b..2c5bb257 100644 --- a/Application/Main.cs +++ b/Application/Main.cs @@ -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 { diff --git a/Application/Misc/Logger.cs b/Application/Misc/Logger.cs index 8647118f..4c7d4f80 100644 --- a/Application/Misc/Logger.cs +++ b/Application/Misc/Logger.cs @@ -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 diff --git a/Application/Misc/PageList.cs b/Application/Misc/PageList.cs index 64130828..a1811704 100644 --- a/Application/Misc/PageList.cs +++ b/Application/Misc/PageList.cs @@ -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 { /// /// implementatin of IPageList that supports basic diff --git a/Application/Plugin/Script/ScriptPlugin.cs b/Application/Plugin/Script/ScriptPlugin.cs index 49822c11..65813387 100644 --- a/Application/Plugin/Script/ScriptPlugin.cs +++ b/Application/Plugin/Script/ScriptPlugin.cs @@ -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())); diff --git a/Application/Plugin/Script/ScriptPluginV2.cs b/Application/Plugin/Script/ScriptPluginV2.cs index 8ac8b2a6..af13736e 100644 --- a/Application/Plugin/Script/ScriptPluginV2.cs +++ b/Application/Plugin/Script/ScriptPluginV2.cs @@ -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())); diff --git a/Application/QueryHelpers/ClientResourceQueryHelper.cs b/Application/QueryHelpers/ClientResourceQueryHelper.cs index d760391a..790c2b3b 100644 --- a/Application/QueryHelpers/ClientResourceQueryHelper.cs +++ b/Application/QueryHelpers/ClientResourceQueryHelper.cs @@ -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; diff --git a/Plugins/AutomessageFeed/AutomessageFeed.csproj b/Plugins/AutomessageFeed/AutomessageFeed.csproj index 73ddb14f..4d06bc75 100644 --- a/Plugins/AutomessageFeed/AutomessageFeed.csproj +++ b/Plugins/AutomessageFeed/AutomessageFeed.csproj @@ -6,6 +6,7 @@ Latest Debug;Release;Prerelease false + IW4MAdmin.Plugins.AutoMessageFeed diff --git a/Plugins/AutomessageFeed/Plugin.cs b/Plugins/AutomessageFeed/Plugin.cs index f5555ba3..efb3cfc3 100644 --- a/Plugins/AutomessageFeed/Plugin.cs +++ b/Plugins/AutomessageFeed/Plugin.cs @@ -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; diff --git a/Plugins/LiveRadar/Configuration/LiveRadarConfiguration.cs b/Plugins/LiveRadar/Configuration/LiveRadarConfiguration.cs index bba53587..b0599784 100644 --- a/Plugins/LiveRadar/Configuration/LiveRadarConfiguration.cs +++ b/Plugins/LiveRadar/Configuration/LiveRadarConfiguration.cs @@ -1,5 +1,5 @@ -using SharedLibraryCore.Interfaces; -using System.Collections.Generic; +using System.Collections.Generic; +using SharedLibraryCore.Interfaces; namespace IW4MAdmin.Plugins.LiveRadar.Configuration; diff --git a/Plugins/LiveRadar/Controllers/RadarController.cs b/Plugins/LiveRadar/Controllers/RadarController.cs index d711d87a..9623f716 100644 --- a/Plugins/LiveRadar/Controllers/RadarController.cs +++ b/Plugins/LiveRadar/Controllers/RadarController.cs @@ -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 { diff --git a/Plugins/LiveRadar/LiveRadar.csproj b/Plugins/LiveRadar/LiveRadar.csproj index 403ebd2d..8e2030b0 100644 --- a/Plugins/LiveRadar/LiveRadar.csproj +++ b/Plugins/LiveRadar/LiveRadar.csproj @@ -13,6 +13,7 @@ Library + IW4MAdmin.Plugins.LiveRadar diff --git a/Plugins/LiveRadar/Plugin.cs b/Plugins/LiveRadar/Plugin.cs index 61231edb..5a04300d 100644 --- a/Plugins/LiveRadar/Plugin.cs +++ b/Plugins/LiveRadar/Plugin.cs @@ -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; diff --git a/Plugins/LiveRadar/RadarDto.cs b/Plugins/LiveRadar/RadarDto.cs index 4608043a..a7a7e9e3 100644 --- a/Plugins/LiveRadar/RadarDto.cs +++ b/Plugins/LiveRadar/RadarDto.cs @@ -1,6 +1,6 @@ using Data.Models; -using SharedLibraryCore; using IW4MAdmin.Plugins.LiveRadar.Events; +using SharedLibraryCore; // ReSharper disable CompareOfFloatsByEqualityOperator #pragma warning disable CS0659 diff --git a/Plugins/Login/Commands/LoginCommand.cs b/Plugins/Login/Commands/LoginCommand.cs index ff71b9f0..cbdbcae4 100644 --- a/Plugins/Login/Commands/LoginCommand.cs +++ b/Plugins/Login/Commands/LoginCommand.cs @@ -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 { diff --git a/Plugins/Login/Login.csproj b/Plugins/Login/Login.csproj index 5c775b5e..80dea50e 100644 --- a/Plugins/Login/Login.csproj +++ b/Plugins/Login/Login.csproj @@ -12,6 +12,7 @@ Login Plugin for IW4MAdmin Debug;Release;Prerelease Latest + IW4MAdmin.Plugins.Login diff --git a/Plugins/ProfanityDeterment/ProfanityDeterment.csproj b/Plugins/ProfanityDeterment/ProfanityDeterment.csproj index 0818d044..075584a6 100644 --- a/Plugins/ProfanityDeterment/ProfanityDeterment.csproj +++ b/Plugins/ProfanityDeterment/ProfanityDeterment.csproj @@ -13,6 +13,7 @@ 2018 Debug;Release;Prerelease Latest + IW4MAdmin.Plugins.ProfanityDeterment diff --git a/Plugins/Stats/Cheat/Detection.cs b/Plugins/Stats/Cheat/Detection.cs index a96058f4..9e80ac9a 100644 --- a/Plugins/Stats/Cheat/Detection.cs +++ b/Plugins/Stats/Cheat/Detection.cs @@ -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 diff --git a/Plugins/Stats/Cheat/Strain.cs b/Plugins/Stats/Cheat/Strain.cs index e06caf22..0dc84a5b 100644 --- a/Plugins/Stats/Cheat/Strain.cs +++ b/Plugins/Stats/Cheat/Strain.cs @@ -1,6 +1,6 @@ -using SharedLibraryCore; -using System; +using System; using Data.Models; +using SharedLibraryCore; namespace IW4MAdmin.Plugins.Stats.Cheat { diff --git a/Plugins/Stats/Cheat/Thresholds.cs b/Plugins/Stats/Cheat/Thresholds.cs index f9b0fa94..dc019164 100644 --- a/Plugins/Stats/Cheat/Thresholds.cs +++ b/Plugins/Stats/Cheat/Thresholds.cs @@ -1,6 +1,6 @@ -using Stats.Config; -using System; +using System; using Data.Models; +using IW4MAdmin.Plugins.Stats.Config; namespace IW4MAdmin.Plugins.Stats.Cheat { diff --git a/Plugins/Stats/Client/Abstractions/IHitInfoBuilder.cs b/Plugins/Stats/Client/Abstractions/IHitInfoBuilder.cs index ca108b7c..211c936b 100644 --- a/Plugins/Stats/Client/Abstractions/IHitInfoBuilder.cs +++ b/Plugins/Stats/Client/Abstractions/IHitInfoBuilder.cs @@ -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 { diff --git a/Plugins/Stats/Client/Abstractions/IServerDistributionCalculator.cs b/Plugins/Stats/Client/Abstractions/IServerDistributionCalculator.cs index 9630c123..683040fb 100644 --- a/Plugins/Stats/Client/Abstractions/IServerDistributionCalculator.cs +++ b/Plugins/Stats/Client/Abstractions/IServerDistributionCalculator.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace Stats.Client.Abstractions +namespace IW4MAdmin.Plugins.Stats.Client.Abstractions { public interface IServerDistributionCalculator { diff --git a/Plugins/Stats/Client/Abstractions/IWeaponNameParser.cs b/Plugins/Stats/Client/Abstractions/IWeaponNameParser.cs index 576829fe..d9e61c57 100644 --- a/Plugins/Stats/Client/Abstractions/IWeaponNameParser.cs +++ b/Plugins/Stats/Client/Abstractions/IWeaponNameParser.cs @@ -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 { diff --git a/Plugins/Stats/Client/Game/AttachmentInfo.cs b/Plugins/Stats/Client/Game/AttachmentInfo.cs index 8b60870a..d1c62221 100644 --- a/Plugins/Stats/Client/Game/AttachmentInfo.cs +++ b/Plugins/Stats/Client/Game/AttachmentInfo.cs @@ -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 { diff --git a/Plugins/Stats/Client/Game/HitInfo.cs b/Plugins/Stats/Client/Game/HitInfo.cs index 55d0dcb3..5dce31d3 100644 --- a/Plugins/Stats/Client/Game/HitInfo.cs +++ b/Plugins/Stats/Client/Game/HitInfo.cs @@ -1,5 +1,4 @@ using Data.Models; -using Stats.Client.Game; namespace IW4MAdmin.Plugins.Stats.Client.Game { diff --git a/Plugins/Stats/Client/Game/WeaponInfo.cs b/Plugins/Stats/Client/Game/WeaponInfo.cs index 09aea1b1..3ec0dbaf 100644 --- a/Plugins/Stats/Client/Game/WeaponInfo.cs +++ b/Plugins/Stats/Client/Game/WeaponInfo.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Stats.Client.Game +namespace IW4MAdmin.Plugins.Stats.Client.Game { public class WeaponInfo { diff --git a/Plugins/Stats/Client/HitCalculator.cs b/Plugins/Stats/Client/HitCalculator.cs index e0bcb137..f65944ea 100644 --- a/Plugins/Stats/Client/HitCalculator.cs +++ b/Plugins/Stats/Client/HitCalculator.cs @@ -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; diff --git a/Plugins/Stats/Client/HitInfoBuilder.cs b/Plugins/Stats/Client/HitInfoBuilder.cs index e9863a8e..f9ba4b7d 100644 --- a/Plugins/Stats/Client/HitInfoBuilder.cs +++ b/Plugins/Stats/Client/HitInfoBuilder.cs @@ -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 { diff --git a/Plugins/Stats/Client/ServerDistributionCalculator.cs b/Plugins/Stats/Client/ServerDistributionCalculator.cs index 76e31eae..aa9cf1a6 100644 --- a/Plugins/Stats/Client/ServerDistributionCalculator.cs +++ b/Plugins/Stats/Client/ServerDistributionCalculator.cs @@ -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 { diff --git a/Plugins/Stats/Client/WeaponNameParser.cs b/Plugins/Stats/Client/WeaponNameParser.cs index 53e4c6f4..31c2c2b3 100644 --- a/Plugins/Stats/Client/WeaponNameParser.cs +++ b/Plugins/Stats/Client/WeaponNameParser.cs @@ -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 { diff --git a/Plugins/Stats/Commands/MostKillsCommand.cs b/Plugins/Stats/Commands/MostKillsCommand.cs index ebbd744f..b72db8e6 100644 --- a/Plugins/Stats/Commands/MostKillsCommand.cs +++ b/Plugins/Stats/Commands/MostKillsCommand.cs @@ -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; diff --git a/Plugins/Stats/Commands/MostPlayedCommand.cs b/Plugins/Stats/Commands/MostPlayedCommand.cs index ec3ff74e..762e1406 100644 --- a/Plugins/Stats/Commands/MostPlayedCommand.cs +++ b/Plugins/Stats/Commands/MostPlayedCommand.cs @@ -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 diff --git a/Plugins/Stats/Commands/ResetAnticheatMetricsCommand.cs b/Plugins/Stats/Commands/ResetAnticheatMetricsCommand.cs index 23b45513..5475f279 100644 --- a/Plugins/Stats/Commands/ResetAnticheatMetricsCommand.cs +++ b/Plugins/Stats/Commands/ResetAnticheatMetricsCommand.cs @@ -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(IW4MAdmin.Plugins.Stats.Helpers.StatManager + gameEvent.Target.GetAdditionalProperty(StatManager .CLIENT_DETECTIONS_KEY); var clientStats = - gameEvent.Target.GetAdditionalProperty(IW4MAdmin.Plugins.Stats.Helpers - .StatManager.CLIENT_STATS_KEY); + gameEvent.Target.GetAdditionalProperty(StatManager.CLIENT_STATS_KEY); if (clientStats != null) { diff --git a/Plugins/Stats/Commands/ResetStats.cs b/Plugins/Stats/Commands/ResetStats.cs index b1f16297..2fb78d62 100644 --- a/Plugins/Stats/Commands/ResetStats.cs +++ b/Plugins/Stats/Commands/ResetStats.cs @@ -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 { diff --git a/Plugins/Stats/Commands/TopStats.cs b/Plugins/Stats/Commands/TopStats.cs index b3d5b134..3e17256a 100644 --- a/Plugins/Stats/Commands/TopStats.cs +++ b/Plugins/Stats/Commands/TopStats.cs @@ -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; diff --git a/Plugins/Stats/Commands/ViewStats.cs b/Plugins/Stats/Commands/ViewStats.cs index 85c36279..ab9cb2e7 100644 --- a/Plugins/Stats/Commands/ViewStats.cs +++ b/Plugins/Stats/Commands/ViewStats.cs @@ -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 { diff --git a/Plugins/Stats/Config/AnticheatConfiguration.cs b/Plugins/Stats/Config/AnticheatConfiguration.cs index 26d10cee..37770335 100644 --- a/Plugins/Stats/Config/AnticheatConfiguration.cs +++ b/Plugins/Stats/Config/AnticheatConfiguration.cs @@ -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 { diff --git a/Plugins/Stats/Config/DistributionConfiguration.cs b/Plugins/Stats/Config/DistributionConfiguration.cs index f44ba981..2e727ffd 100644 --- a/Plugins/Stats/Config/DistributionConfiguration.cs +++ b/Plugins/Stats/Config/DistributionConfiguration.cs @@ -1,4 +1,4 @@ -namespace Stats.Config +namespace IW4MAdmin.Plugins.Stats.Config { public class DistributionConfiguration { diff --git a/Plugins/Stats/Config/StatsConfiguration.cs b/Plugins/Stats/Config/StatsConfiguration.cs index 024b5008..5ba4208f 100644 --- a/Plugins/Stats/Config/StatsConfiguration.cs +++ b/Plugins/Stats/Config/StatsConfiguration.cs @@ -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 { diff --git a/Plugins/Stats/Config/StreakMessageConfiguration.cs b/Plugins/Stats/Config/StreakMessageConfiguration.cs index 345ecff9..a52c50a0 100644 --- a/Plugins/Stats/Config/StreakMessageConfiguration.cs +++ b/Plugins/Stats/Config/StreakMessageConfiguration.cs @@ -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 { diff --git a/Plugins/Stats/Config/WeaponNameParserConfiguration.cs b/Plugins/Stats/Config/WeaponNameParserConfiguration.cs index c9ae1e8e..424c3839 100644 --- a/Plugins/Stats/Config/WeaponNameParserConfiguration.cs +++ b/Plugins/Stats/Config/WeaponNameParserConfiguration.cs @@ -1,6 +1,6 @@ using Data.Models; -namespace Stats.Config +namespace IW4MAdmin.Plugins.Stats.Config { public class WeaponNameParserConfiguration { diff --git a/Plugins/Stats/Dtos/AdvancedStatsInfo.cs b/Plugins/Stats/Dtos/AdvancedStatsInfo.cs index bb09093c..1a09e518 100644 --- a/Plugins/Stats/Dtos/AdvancedStatsInfo.cs +++ b/Plugins/Stats/Dtos/AdvancedStatsInfo.cs @@ -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 { diff --git a/Plugins/Stats/Dtos/ChatSearchQuery.cs b/Plugins/Stats/Dtos/ChatSearchQuery.cs index 44338907..b7ef1395 100644 --- a/Plugins/Stats/Dtos/ChatSearchQuery.cs +++ b/Plugins/Stats/Dtos/ChatSearchQuery.cs @@ -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 { diff --git a/Plugins/Stats/Dtos/StatsInfoRequest.cs b/Plugins/Stats/Dtos/StatsInfoRequest.cs index 3340a06f..c7e5f9cf 100644 --- a/Plugins/Stats/Dtos/StatsInfoRequest.cs +++ b/Plugins/Stats/Dtos/StatsInfoRequest.cs @@ -1,4 +1,4 @@ -namespace Stats.Dtos +namespace IW4MAdmin.Plugins.Stats.Dtos { public class StatsInfoRequest { diff --git a/Plugins/Stats/Dtos/StatsInfoResult.cs b/Plugins/Stats/Dtos/StatsInfoResult.cs index 628419f1..102a01e4 100644 --- a/Plugins/Stats/Dtos/StatsInfoResult.cs +++ b/Plugins/Stats/Dtos/StatsInfoResult.cs @@ -1,7 +1,7 @@ using System; using System.Text.Json.Serialization; -namespace Stats.Dtos +namespace IW4MAdmin.Plugins.Stats.Dtos { public class StatsInfoResult { diff --git a/Plugins/Stats/Dtos/TopStatsInfo.cs b/Plugins/Stats/Dtos/TopStatsInfo.cs index 56403ed7..0be1c9b2 100644 --- a/Plugins/Stats/Dtos/TopStatsInfo.cs +++ b/Plugins/Stats/Dtos/TopStatsInfo.cs @@ -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 { diff --git a/Plugins/Stats/Events/Script.cs b/Plugins/Stats/Events/Script.cs index f52ef903..471d0f00 100644 --- a/Plugins/Stats/Events/Script.cs +++ b/Plugins/Stats/Events/Script.cs @@ -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 { diff --git a/Plugins/Stats/Helpers/ChatResourceQueryHelper.cs b/Plugins/Stats/Helpers/ChatResourceQueryHelper.cs index f00bd8fe..d3254faf 100644 --- a/Plugins/Stats/Helpers/ChatResourceQueryHelper.cs +++ b/Plugins/Stats/Helpers/ChatResourceQueryHelper.cs @@ -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 { /// /// implementation of IResourceQueryHelper diff --git a/Plugins/Stats/Helpers/MigrationHelper.cs b/Plugins/Stats/Helpers/MigrationHelper.cs index e63638df..987ae04f 100644 --- a/Plugins/Stats/Helpers/MigrationHelper.cs +++ b/Plugins/Stats/Helpers/MigrationHelper.cs @@ -1,4 +1,4 @@ -namespace Stats.Helpers +namespace IW4MAdmin.Plugins.Stats.Helpers { public class MigrationHelper { diff --git a/Plugins/Stats/Helpers/ServerStats.cs b/Plugins/Stats/Helpers/ServerStats.cs index f9e25d83..5f7e7de1 100644 --- a/Plugins/Stats/Helpers/ServerStats.cs +++ b/Plugins/Stats/Helpers/ServerStats.cs @@ -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 { diff --git a/Plugins/Stats/Helpers/StatManager.cs b/Plugins/Stats/Helpers/StatManager.cs index 0ed89842..8f90ff48 100644 --- a/Plugins/Stats/Helpers/StatManager.cs +++ b/Plugins/Stats/Helpers/StatManager.cs @@ -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; diff --git a/Plugins/Stats/Helpers/StatsResourceQueryHelper.cs b/Plugins/Stats/Helpers/StatsResourceQueryHelper.cs index 93f6f606..9c504222 100644 --- a/Plugins/Stats/Helpers/StatsResourceQueryHelper.cs +++ b/Plugins/Stats/Helpers/StatsResourceQueryHelper.cs @@ -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 { /// /// implementation for IResourceQueryHelper diff --git a/Plugins/Stats/Helpers/StreakMessage.cs b/Plugins/Stats/Helpers/StreakMessage.cs index be0ca529..a2148ea8 100644 --- a/Plugins/Stats/Helpers/StreakMessage.cs +++ b/Plugins/Stats/Helpers/StreakMessage.cs @@ -1,5 +1,5 @@ using System.Linq; -using Stats.Config; +using IW4MAdmin.Plugins.Stats.Config; namespace IW4MAdmin.Plugins.Stats.Helpers; diff --git a/Plugins/Stats/Helpers/WeaponNameExtensions.cs b/Plugins/Stats/Helpers/WeaponNameExtensions.cs index 76da43b0..3d74b373 100644 --- a/Plugins/Stats/Helpers/WeaponNameExtensions.cs +++ b/Plugins/Stats/Helpers/WeaponNameExtensions.cs @@ -1,6 +1,6 @@ using Data.Models.Client.Stats; -namespace Stats.Helpers +namespace IW4MAdmin.Plugins.Stats.Helpers { public static class WeaponNameExtensions { diff --git a/Plugins/Stats/Plugin.cs b/Plugins/Stats/Plugin.cs index fabc6da2..ce238b03 100644 --- a/Plugins/Stats/Plugin.cs +++ b/Plugins/Stats/Plugin.cs @@ -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; diff --git a/Plugins/Stats/Stats.csproj b/Plugins/Stats/Stats.csproj index c8fafb0a..135fb913 100644 --- a/Plugins/Stats/Stats.csproj +++ b/Plugins/Stats/Stats.csproj @@ -14,6 +14,7 @@ Debug;Release;Prerelease Latest false + IW4MAdmin.Plugins.Stats diff --git a/Plugins/Welcome/Welcome.csproj b/Plugins/Welcome/Welcome.csproj index 11c3a037..6914117e 100644 --- a/Plugins/Welcome/Welcome.csproj +++ b/Plugins/Welcome/Welcome.csproj @@ -13,6 +13,7 @@ 2018 Debug;Release;Prerelease Latest + IW4MAdmin.Plugins.Welcome diff --git a/WebfrontCore/Controllers/API/APIController.cs b/WebfrontCore/Controllers/API/APIController.cs index da618769..b235b1fb 100644 --- a/WebfrontCore/Controllers/API/APIController.cs +++ b/WebfrontCore/Controllers/API/APIController.cs @@ -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 { diff --git a/WebfrontCore/Controllers/API/ClientController.cs b/WebfrontCore/Controllers/API/ClientController.cs index 764e2662..5530e9c2 100644 --- a/WebfrontCore/Controllers/API/ClientController.cs +++ b/WebfrontCore/Controllers/API/ClientController.cs @@ -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 { /// /// api controller for client operations diff --git a/WebfrontCore/Controllers/API/Dtos/FindClientResponse.cs b/WebfrontCore/Controllers/API/Dtos/FindClientResponse.cs index 8a8c4446..750a6d6a 100644 --- a/WebfrontCore/Controllers/API/Dtos/FindClientResponse.cs +++ b/WebfrontCore/Controllers/API/Dtos/FindClientResponse.cs @@ -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 { diff --git a/WebfrontCore/Controllers/API/Dtos/InfoResponse.cs b/WebfrontCore/Controllers/API/Dtos/InfoResponse.cs index 4909b0b5..fea94436 100644 --- a/WebfrontCore/Controllers/API/Dtos/InfoResponse.cs +++ b/WebfrontCore/Controllers/API/Dtos/InfoResponse.cs @@ -1,6 +1,6 @@ using System; -namespace WebfrontCore.Controllers.API.Dtos; +namespace IW4MAdmin.WebfrontCore.Controllers.API.Dtos; public class InfoResponse { diff --git a/WebfrontCore/Controllers/API/Info.cs b/WebfrontCore/Controllers/API/Info.cs index 385f511c..b527e895 100644 --- a/WebfrontCore/Controllers/API/Info.cs +++ b/WebfrontCore/Controllers/API/Info.cs @@ -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]")] diff --git a/WebfrontCore/Controllers/API/Models/CommandRequest.cs b/WebfrontCore/Controllers/API/Models/CommandRequest.cs index 64859a6a..27b5a14e 100644 --- a/WebfrontCore/Controllers/API/Models/CommandRequest.cs +++ b/WebfrontCore/Controllers/API/Models/CommandRequest.cs @@ -1,4 +1,4 @@ -namespace WebfrontCore.Controllers.API.Models +namespace IW4MAdmin.WebfrontCore.Controllers.API.Models { public class CommandRequest { diff --git a/WebfrontCore/Controllers/API/PenaltyController.cs b/WebfrontCore/Controllers/API/PenaltyController.cs index 56e01ef5..8dae8592 100644 --- a/WebfrontCore/Controllers/API/PenaltyController.cs +++ b/WebfrontCore/Controllers/API/PenaltyController.cs @@ -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 diff --git a/WebfrontCore/Controllers/API/Server.cs b/WebfrontCore/Controllers/API/Server.cs index 023274fb..cc10b71a 100644 --- a/WebfrontCore/Controllers/API/Server.cs +++ b/WebfrontCore/Controllers/API/Server.cs @@ -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]")] diff --git a/WebfrontCore/Controllers/API/StatsController.cs b/WebfrontCore/Controllers/API/StatsController.cs index 9b2e72cf..96557c36 100644 --- a/WebfrontCore/Controllers/API/StatsController.cs +++ b/WebfrontCore/Controllers/API/StatsController.cs @@ -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")] diff --git a/WebfrontCore/Controllers/API/Validation/FindClientRequestValidator.cs b/WebfrontCore/Controllers/API/Validation/FindClientRequestValidator.cs index 968c653d..0aa69b81 100644 --- a/WebfrontCore/Controllers/API/Validation/FindClientRequestValidator.cs +++ b/WebfrontCore/Controllers/API/Validation/FindClientRequestValidator.cs @@ -2,7 +2,7 @@ using FluentValidation; using SharedLibraryCore.Dtos; -namespace WebfrontCore.Controllers.API.Validation +namespace IW4MAdmin.WebfrontCore.Controllers.API.Validation { /// /// validator for FindClientRequest diff --git a/WebfrontCore/Controllers/AboutController.cs b/WebfrontCore/Controllers/AboutController.cs index 8119491c..e4a2106f 100644 --- a/WebfrontCore/Controllers/AboutController.cs +++ b/WebfrontCore/Controllers/AboutController.cs @@ -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 { diff --git a/WebfrontCore/Controllers/AccountController.cs b/WebfrontCore/Controllers/AccountController.cs index a436b16d..bf22451a 100644 --- a/WebfrontCore/Controllers/AccountController.cs +++ b/WebfrontCore/Controllers/AccountController.cs @@ -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 { diff --git a/WebfrontCore/Controllers/ActionController.cs b/WebfrontCore/Controllers/ActionController.cs index 338e62fa..eb11f5a2 100644 --- a/WebfrontCore/Controllers/ActionController.cs +++ b/WebfrontCore/Controllers/ActionController.cs @@ -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 { diff --git a/WebfrontCore/Controllers/AdminController.cs b/WebfrontCore/Controllers/AdminController.cs index e47bc721..be44faa4 100644 --- a/WebfrontCore/Controllers/AdminController.cs +++ b/WebfrontCore/Controllers/AdminController.cs @@ -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 { diff --git a/WebfrontCore/Controllers/Client/ClientController.cs b/WebfrontCore/Controllers/Client/ClientController.cs index 3f3d8559..5118f94a 100644 --- a/WebfrontCore/Controllers/Client/ClientController.cs +++ b/WebfrontCore/Controllers/Client/ClientController.cs @@ -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 { diff --git a/WebfrontCore/Controllers/Client/ClientStatisticsController.cs b/WebfrontCore/Controllers/Client/ClientStatisticsController.cs index 55de0e4e..21cc33eb 100644 --- a/WebfrontCore/Controllers/Client/ClientStatisticsController.cs +++ b/WebfrontCore/Controllers/Client/ClientStatisticsController.cs @@ -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 diff --git a/WebfrontCore/Controllers/Client/Legacy/StatsController.cs b/WebfrontCore/Controllers/Client/Legacy/StatsController.cs index 24fa0494..350846d5 100644 --- a/WebfrontCore/Controllers/Client/Legacy/StatsController.cs +++ b/WebfrontCore/Controllers/Client/Legacy/StatsController.cs @@ -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 { diff --git a/WebfrontCore/Controllers/ConfigurationController.cs b/WebfrontCore/Controllers/ConfigurationController.cs index 876c49e5..a372e0ff 100644 --- a/WebfrontCore/Controllers/ConfigurationController.cs +++ b/WebfrontCore/Controllers/ConfigurationController.cs @@ -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 diff --git a/WebfrontCore/Controllers/ConsoleController.cs b/WebfrontCore/Controllers/ConsoleController.cs index 8dbf3219..fc19f153 100644 --- a/WebfrontCore/Controllers/ConsoleController.cs +++ b/WebfrontCore/Controllers/ConsoleController.cs @@ -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 { diff --git a/WebfrontCore/Controllers/HomeController.cs b/WebfrontCore/Controllers/HomeController.cs index 12261bbc..35ab2e09 100644 --- a/WebfrontCore/Controllers/HomeController.cs +++ b/WebfrontCore/Controllers/HomeController.cs @@ -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 { diff --git a/WebfrontCore/Controllers/InteractionController.cs b/WebfrontCore/Controllers/InteractionController.cs index a006feae..ccafe80d 100644 --- a/WebfrontCore/Controllers/InteractionController.cs +++ b/WebfrontCore/Controllers/InteractionController.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Mvc; using SharedLibraryCore; using SharedLibraryCore.Interfaces; -namespace WebfrontCore.Controllers; +namespace IW4MAdmin.WebfrontCore.Controllers; public class InteractionController : BaseController { diff --git a/WebfrontCore/Controllers/PenaltyController.cs b/WebfrontCore/Controllers/PenaltyController.cs index 332380d0..61ab9c7f 100644 --- a/WebfrontCore/Controllers/PenaltyController.cs +++ b/WebfrontCore/Controllers/PenaltyController.cs @@ -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 { diff --git a/WebfrontCore/Controllers/ServerController.cs b/WebfrontCore/Controllers/ServerController.cs index 41ea1af3..8f6a3ebb 100644 --- a/WebfrontCore/Controllers/ServerController.cs +++ b/WebfrontCore/Controllers/ServerController.cs @@ -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 { diff --git a/WebfrontCore/Extensions/WebfrontExtensions.cs b/WebfrontCore/Extensions/WebfrontExtensions.cs index ec5807e8..378160fa 100644 --- a/WebfrontCore/Extensions/WebfrontExtensions.cs +++ b/WebfrontCore/Extensions/WebfrontExtensions.cs @@ -1,6 +1,6 @@ using SharedLibraryCore.Configuration; -namespace WebfrontCore.Extensions +namespace IW4MAdmin.WebfrontCore.Extensions { public static class WebfrontExtensions { diff --git a/WebfrontCore/Middleware/ClaimsPermissionRemoval.cs b/WebfrontCore/Middleware/ClaimsPermissionRemoval.cs index 0aeaae84..77500a16 100644 --- a/WebfrontCore/Middleware/ClaimsPermissionRemoval.cs +++ b/WebfrontCore/Middleware/ClaimsPermissionRemoval.cs @@ -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 { /// /// Facilitates the removal of identity claims when client is demoted diff --git a/WebfrontCore/Middleware/IPWhitelist.cs b/WebfrontCore/Middleware/IPWhitelist.cs index e6cebe32..8945b0b0 100644 --- a/WebfrontCore/Middleware/IPWhitelist.cs +++ b/WebfrontCore/Middleware/IPWhitelist.cs @@ -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 { /// /// Defines the middleware functioning to whitelist connection from diff --git a/WebfrontCore/Permissions/WebfrontEntity.cs b/WebfrontCore/Permissions/WebfrontEntity.cs index 91869da4..e3713dd1 100644 --- a/WebfrontCore/Permissions/WebfrontEntity.cs +++ b/WebfrontCore/Permissions/WebfrontEntity.cs @@ -1,4 +1,4 @@ -namespace WebfrontCore.Permissions; +namespace IW4MAdmin.WebfrontCore.Permissions; public enum WebfrontEntity { diff --git a/WebfrontCore/Program.cs b/WebfrontCore/Program.cs index 978ee516..9f9cdb28 100644 --- a/WebfrontCore/Program.cs +++ b/WebfrontCore/Program.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; using SharedLibraryCore.Interfaces; -namespace WebfrontCore +namespace IW4MAdmin.WebfrontCore { public class Program { diff --git a/WebfrontCore/QueryHelpers/BanInfoResourceQueryHelper.cs b/WebfrontCore/QueryHelpers/BanInfoResourceQueryHelper.cs index 682d4bd4..b8860e2a 100644 --- a/WebfrontCore/QueryHelpers/BanInfoResourceQueryHelper.cs +++ b/WebfrontCore/QueryHelpers/BanInfoResourceQueryHelper.cs @@ -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 { diff --git a/WebfrontCore/QueryHelpers/Models/BanInfo.cs b/WebfrontCore/QueryHelpers/Models/BanInfo.cs index 2649cc2e..03f1077e 100644 --- a/WebfrontCore/QueryHelpers/Models/BanInfo.cs +++ b/WebfrontCore/QueryHelpers/Models/BanInfo.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Data.Models; -namespace WebfrontCore.QueryHelpers.Models; +namespace IW4MAdmin.WebfrontCore.QueryHelpers.Models; public class BanInfo { diff --git a/WebfrontCore/QueryHelpers/Models/BanInfoRequest.cs b/WebfrontCore/QueryHelpers/Models/BanInfoRequest.cs index 4e3adbd6..3f1ff49b 100644 --- a/WebfrontCore/QueryHelpers/Models/BanInfoRequest.cs +++ b/WebfrontCore/QueryHelpers/Models/BanInfoRequest.cs @@ -1,6 +1,6 @@ using SharedLibraryCore.Dtos; -namespace WebfrontCore.QueryHelpers.Models; +namespace IW4MAdmin.WebfrontCore.QueryHelpers.Models; public class BanInfoRequest : PaginationRequest { diff --git a/WebfrontCore/QueryHelpers/Models/ChatResourceRequest.cs b/WebfrontCore/QueryHelpers/Models/ChatResourceRequest.cs index 4cd8d43a..c0508056 100644 --- a/WebfrontCore/QueryHelpers/Models/ChatResourceRequest.cs +++ b/WebfrontCore/QueryHelpers/Models/ChatResourceRequest.cs @@ -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 { diff --git a/WebfrontCore/QueryHelpers/Models/ClientResourceRequest.cs b/WebfrontCore/QueryHelpers/Models/ClientResourceRequest.cs index cc7dec26..d7f8e00a 100644 --- a/WebfrontCore/QueryHelpers/Models/ClientResourceRequest.cs +++ b/WebfrontCore/QueryHelpers/Models/ClientResourceRequest.cs @@ -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 { diff --git a/WebfrontCore/QueryHelpers/Models/ClientResourceResponse.cs b/WebfrontCore/QueryHelpers/Models/ClientResourceResponse.cs index d4cab44c..954710b8 100644 --- a/WebfrontCore/QueryHelpers/Models/ClientResourceResponse.cs +++ b/WebfrontCore/QueryHelpers/Models/ClientResourceResponse.cs @@ -2,7 +2,7 @@ using Data.Models; using Data.Models.Client; -namespace WebfrontCore.QueryHelpers.Models; +namespace IW4MAdmin.WebfrontCore.QueryHelpers.Models; public class ClientResourceResponse { diff --git a/WebfrontCore/Startup.cs b/WebfrontCore/Startup.cs index 6af15888..f4134df7 100644 --- a/WebfrontCore/Startup.cs +++ b/WebfrontCore/Startup.cs @@ -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().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"); diff --git a/WebfrontCore/TagHelpers/HasPermission.cs b/WebfrontCore/TagHelpers/HasPermission.cs index 9e86d8fd..06d3d98a 100644 --- a/WebfrontCore/TagHelpers/HasPermission.cs +++ b/WebfrontCore/TagHelpers/HasPermission.cs @@ -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 diff --git a/WebfrontCore/ViewComponents/PenaltyListViewComponent.cs b/WebfrontCore/ViewComponents/PenaltyListViewComponent.cs index ea1b2230..b7af7f6b 100644 --- a/WebfrontCore/ViewComponents/PenaltyListViewComponent.cs +++ b/WebfrontCore/ViewComponents/PenaltyListViewComponent.cs @@ -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 { diff --git a/WebfrontCore/ViewComponents/ProfileMetaListViewComponent.cs b/WebfrontCore/ViewComponents/ProfileMetaListViewComponent.cs index 471e7483..8f792e7e 100644 --- a/WebfrontCore/ViewComponents/ProfileMetaListViewComponent.cs +++ b/WebfrontCore/ViewComponents/ProfileMetaListViewComponent.cs @@ -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 { diff --git a/WebfrontCore/ViewComponents/ServerListViewComponent.cs b/WebfrontCore/ViewComponents/ServerListViewComponent.cs index 94970cc5..0aca731d 100644 --- a/WebfrontCore/ViewComponents/ServerListViewComponent.cs +++ b/WebfrontCore/ViewComponents/ServerListViewComponent.cs @@ -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 { diff --git a/WebfrontCore/ViewComponents/TopPlayersViewComponent.cs b/WebfrontCore/ViewComponents/TopPlayersViewComponent.cs index 81587bec..3ba709f1 100644 --- a/WebfrontCore/ViewComponents/TopPlayersViewComponent.cs +++ b/WebfrontCore/ViewComponents/TopPlayersViewComponent.cs @@ -1,12 +1,13 @@ using System.Linq; using System.Threading.Tasks; using IW4MAdmin.Plugins.Stats; +using IW4MAdmin.Plugins.Stats.Config; using IW4MAdmin.Plugins.Stats.Helpers; using Microsoft.AspNetCore.Mvc; using SharedLibraryCore.Interfaces; -using Stats.Config; +using Stats; -namespace WebfrontCore.ViewComponents +namespace IW4MAdmin.WebfrontCore.ViewComponents { public class TopPlayersViewComponent : ViewComponent { diff --git a/WebfrontCore/ViewModels/ActionInfo.cs b/WebfrontCore/ViewModels/ActionInfo.cs index 6e3da2ab..80a3a13e 100644 --- a/WebfrontCore/ViewModels/ActionInfo.cs +++ b/WebfrontCore/ViewModels/ActionInfo.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System.Collections.Generic; -namespace WebfrontCore.ViewModels +namespace IW4MAdmin.WebfrontCore.ViewModels { public class ActionInfo { diff --git a/WebfrontCore/ViewModels/BindingHelper.cs b/WebfrontCore/ViewModels/BindingHelper.cs index d45e89b4..d5f5d61b 100644 --- a/WebfrontCore/ViewModels/BindingHelper.cs +++ b/WebfrontCore/ViewModels/BindingHelper.cs @@ -1,4 +1,4 @@ -namespace WebfrontCore.ViewModels +namespace IW4MAdmin.WebfrontCore.ViewModels { /// /// Helper class that hold information to assist with binding lists of items diff --git a/WebfrontCore/ViewModels/CommunityInfo.cs b/WebfrontCore/ViewModels/CommunityInfo.cs index 9a01da96..04034cbb 100644 --- a/WebfrontCore/ViewModels/CommunityInfo.cs +++ b/WebfrontCore/ViewModels/CommunityInfo.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using SharedLibraryCore.Configuration; -namespace WebfrontCore.ViewModels +namespace IW4MAdmin.WebfrontCore.ViewModels { public class CommunityInfo { diff --git a/WebfrontCore/ViewModels/ConfigurationFileInfo.cs b/WebfrontCore/ViewModels/ConfigurationFileInfo.cs index b4569ef4..7c002c05 100644 --- a/WebfrontCore/ViewModels/ConfigurationFileInfo.cs +++ b/WebfrontCore/ViewModels/ConfigurationFileInfo.cs @@ -1,4 +1,4 @@ -namespace WebfrontCore.ViewModels +namespace IW4MAdmin.WebfrontCore.ViewModels { public class ConfigurationFileInfo { diff --git a/WebfrontCore/ViewModels/InputInfo.cs b/WebfrontCore/ViewModels/InputInfo.cs index 686bb113..f6971ea1 100644 --- a/WebfrontCore/ViewModels/InputInfo.cs +++ b/WebfrontCore/ViewModels/InputInfo.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace WebfrontCore.ViewModels +namespace IW4MAdmin.WebfrontCore.ViewModels { public class InputInfo { diff --git a/WebfrontCore/ViewModels/PenaltyFilterInfo.cs b/WebfrontCore/ViewModels/PenaltyFilterInfo.cs index bd947c60..ae0ad54e 100644 --- a/WebfrontCore/ViewModels/PenaltyFilterInfo.cs +++ b/WebfrontCore/ViewModels/PenaltyFilterInfo.cs @@ -1,6 +1,6 @@ using Data.Models; -namespace WebfrontCore.ViewModels +namespace IW4MAdmin.WebfrontCore.ViewModels { /// /// helper class to determine the filters to apply to penalties diff --git a/WebfrontCore/ViewModels/ScoreboardInfo.cs b/WebfrontCore/ViewModels/ScoreboardInfo.cs index f58280ab..ff20338a 100644 --- a/WebfrontCore/ViewModels/ScoreboardInfo.cs +++ b/WebfrontCore/ViewModels/ScoreboardInfo.cs @@ -1,9 +1,8 @@ using System.Collections.Generic; using Data.Models; -using Microsoft.EntityFrameworkCore.Metadata.Internal; using SharedLibraryCore.Database.Models; -namespace WebfrontCore.ViewModels +namespace IW4MAdmin.WebfrontCore.ViewModels { public class ScoreboardInfo { diff --git a/WebfrontCore/ViewModels/SideContextMenuItem.cs b/WebfrontCore/ViewModels/SideContextMenuItem.cs index 76176a6f..7ad4058f 100644 --- a/WebfrontCore/ViewModels/SideContextMenuItem.cs +++ b/WebfrontCore/ViewModels/SideContextMenuItem.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace WebfrontCore.ViewModels; +namespace IW4MAdmin.WebfrontCore.ViewModels; public class SideContextMenuItem { diff --git a/WebfrontCore/ViewModels/TableInfo.cs b/WebfrontCore/ViewModels/TableInfo.cs index b0b7888f..a91fbb29 100644 --- a/WebfrontCore/ViewModels/TableInfo.cs +++ b/WebfrontCore/ViewModels/TableInfo.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Html; -namespace WebfrontCore.ViewModels; +namespace IW4MAdmin.WebfrontCore.ViewModels; public class TableInfo { diff --git a/WebfrontCore/Views/About/Index.cshtml b/WebfrontCore/Views/About/Index.cshtml index f249012d..c5443cdb 100644 --- a/WebfrontCore/Views/About/Index.cshtml +++ b/WebfrontCore/Views/About/Index.cshtml @@ -1,6 +1,7 @@ @using SharedLibraryCore.Configuration @using System.Text.RegularExpressions -@model WebfrontCore.ViewModels.CommunityInfo +@using SharedLibraryCore +@model IW4MAdmin.WebfrontCore.ViewModels.CommunityInfo @{ IEnumerable> allRules = new[] { new KeyValuePair<(string, long), string[]>((ViewBag.Localization["WEBFRONT_ABOUT_GLOBAL_RULES"], 0), Model.GlobalRules) }; var serverRules = Model.ServerRules?.Where(server => server.Value != null && server.Value.Any()).ToList(); diff --git a/WebfrontCore/Views/Action/_ActionForm.cshtml b/WebfrontCore/Views/Action/_ActionForm.cshtml index 31d173f5..cc8ccacb 100644 --- a/WebfrontCore/Views/Action/_ActionForm.cshtml +++ b/WebfrontCore/Views/Action/_ActionForm.cshtml @@ -1,5 +1,5 @@ @using Humanizer -@model WebfrontCore.ViewModels.ActionInfo +@model IW4MAdmin.WebfrontCore.ViewModels.ActionInfo @{ Layout = null; } diff --git a/WebfrontCore/Views/Admin/BanManagement.cshtml b/WebfrontCore/Views/Admin/BanManagement.cshtml index acac370a..cfeffe4d 100644 --- a/WebfrontCore/Views/Admin/BanManagement.cshtml +++ b/WebfrontCore/Views/Admin/BanManagement.cshtml @@ -1,4 +1,4 @@ -@model IEnumerable +@model IEnumerable

@ViewBag.Title

diff --git a/WebfrontCore/Views/Admin/_BanEntries.cshtml b/WebfrontCore/Views/Admin/_BanEntries.cshtml index cc91e2f3..3601d70e 100644 --- a/WebfrontCore/Views/Admin/_BanEntries.cshtml +++ b/WebfrontCore/Views/Admin/_BanEntries.cshtml @@ -1,4 +1,5 @@ -@model IEnumerable +@using SharedLibraryCore +@model IEnumerable @foreach (var ban in Model) { diff --git a/WebfrontCore/Views/Admin/_ListAuditLog.cshtml b/WebfrontCore/Views/Admin/_ListAuditLog.cshtml index 4a932ff3..c82571da 100644 --- a/WebfrontCore/Views/Admin/_ListAuditLog.cshtml +++ b/WebfrontCore/Views/Admin/_ListAuditLog.cshtml @@ -1,4 +1,5 @@ -@using SharedLibraryCore.Dtos +@using SharedLibraryCore +@using SharedLibraryCore.Dtos @model IEnumerable @{ var loc = Utilities.CurrentLocalization.LocalizationIndex; diff --git a/WebfrontCore/Views/Client/Find/AdvancedFind.cshtml b/WebfrontCore/Views/Client/Find/AdvancedFind.cshtml index cf66ba26..b0224a6d 100644 --- a/WebfrontCore/Views/Client/Find/AdvancedFind.cshtml +++ b/WebfrontCore/Views/Client/Find/AdvancedFind.cshtml @@ -1,4 +1,5 @@ -@model IEnumerable +@using SharedLibraryCore +@model IEnumerable @{ var loc = Utilities.CurrentLocalization.LocalizationIndex; } diff --git a/WebfrontCore/Views/Client/Find/Index.cshtml b/WebfrontCore/Views/Client/Find/Index.cshtml index 9d60140d..6da6c75b 100644 --- a/WebfrontCore/Views/Client/Find/Index.cshtml +++ b/WebfrontCore/Views/Client/Find/Index.cshtml @@ -1,4 +1,5 @@ -@model IList +@using SharedLibraryCore +@model IList @{ var loc = Utilities.CurrentLocalization.LocalizationIndex; } diff --git a/WebfrontCore/Views/Client/Find/_AdvancedFindContent.cshtml b/WebfrontCore/Views/Client/Find/_AdvancedFindContent.cshtml index d6466c44..1be8cf50 100644 --- a/WebfrontCore/Views/Client/Find/_AdvancedFindContent.cshtml +++ b/WebfrontCore/Views/Client/Find/_AdvancedFindContent.cshtml @@ -1,8 +1,8 @@ -@using WebfrontCore.QueryHelpers.Models @using Microsoft.AspNetCore.Mvc.TagHelpers -@using WebfrontCore.Permissions @using Data.Models.Client -@model WebfrontCore.QueryHelpers.Models.ClientResourceResponse +@using IW4MAdmin.WebfrontCore.Permissions +@using IW4MAdmin.WebfrontCore.QueryHelpers.Models +@using SharedLibraryCore @{ var loc = Utilities.CurrentLocalization.LocalizationIndex; diff --git a/WebfrontCore/Views/Client/Find/_AdvancedFindList.cshtml b/WebfrontCore/Views/Client/Find/_AdvancedFindList.cshtml index 1bb60794..78c023f3 100644 --- a/WebfrontCore/Views/Client/Find/_AdvancedFindList.cshtml +++ b/WebfrontCore/Views/Client/Find/_AdvancedFindList.cshtml @@ -1,4 +1,4 @@ -@model IEnumerable +@model IEnumerable @foreach (var client in Model) { diff --git a/WebfrontCore/Views/Client/Message/Find.cshtml b/WebfrontCore/Views/Client/Message/Find.cshtml index 74036c9b..006782b0 100644 --- a/WebfrontCore/Views/Client/Message/Find.cshtml +++ b/WebfrontCore/Views/Client/Message/Find.cshtml @@ -1,4 +1,5 @@ -@using SharedLibraryCore.Dtos.Meta.Responses +@using SharedLibraryCore +@using SharedLibraryCore.Dtos.Meta.Responses @model SharedLibraryCore.Helpers.ResourceQueryHelperResult
diff --git a/WebfrontCore/Views/Client/Message/_Item.cshtml b/WebfrontCore/Views/Client/Message/_Item.cshtml index afad0cf4..95df0053 100644 --- a/WebfrontCore/Views/Client/Message/_Item.cshtml +++ b/WebfrontCore/Views/Client/Message/_Item.cshtml @@ -1,4 +1,5 @@ -@using SharedLibraryCore.Dtos.Meta.Responses +@using SharedLibraryCore +@using SharedLibraryCore.Dtos.Meta.Responses @model IEnumerable @foreach (var message in Model) diff --git a/WebfrontCore/Views/Client/Privileged/Index.cshtml b/WebfrontCore/Views/Client/Privileged/Index.cshtml index 53bf43a9..861bf06e 100644 --- a/WebfrontCore/Views/Client/Privileged/Index.cshtml +++ b/WebfrontCore/Views/Client/Privileged/Index.cshtml @@ -1,4 +1,5 @@ -@model Dictionary> +@using SharedLibraryCore +@model Dictionary>

@ViewBag.Title

diff --git a/WebfrontCore/Views/Client/Profile/Index.cshtml b/WebfrontCore/Views/Client/Profile/Index.cshtml index b5e067ec..d5f9e446 100644 --- a/WebfrontCore/Views/Client/Profile/Index.cshtml +++ b/WebfrontCore/Views/Client/Profile/Index.cshtml @@ -1,8 +1,9 @@ @using SharedLibraryCore.Interfaces @using Data.Models @using Data.Models.Client -@using WebfrontCore.Permissions -@using WebfrontCore.ViewModels +@using IW4MAdmin.WebfrontCore.Permissions +@using IW4MAdmin.WebfrontCore.ViewModels +@using SharedLibraryCore @model SharedLibraryCore.Dtos.PlayerInfo @{ var match = System.Text.RegularExpressions.Regex.Match(Model.Name.ToUpper(), "[A-Z]").Value; diff --git a/WebfrontCore/Views/Client/Profile/Meta/_AdministeredPenaltyResponse.cshtml b/WebfrontCore/Views/Client/Profile/Meta/_AdministeredPenaltyResponse.cshtml index 7f47685d..05dda808 100644 --- a/WebfrontCore/Views/Client/Profile/Meta/_AdministeredPenaltyResponse.cshtml +++ b/WebfrontCore/Views/Client/Profile/Meta/_AdministeredPenaltyResponse.cshtml @@ -1,4 +1,5 @@ -@using SharedLibraryCore.Dtos.Meta.Responses +@using SharedLibraryCore +@using SharedLibraryCore.Dtos.Meta.Responses @model AdministeredPenaltyResponse @{ var localizationKey = $"WEBFRONT_CLIENT_META_PENALIZED_{Model.PenaltyType.ToString().ToUpper()}_V2"; diff --git a/WebfrontCore/Views/Client/Profile/Meta/_ConnectionHistoryResponse.cshtml b/WebfrontCore/Views/Client/Profile/Meta/_ConnectionHistoryResponse.cshtml index 302b7161..1dfdca3a 100644 --- a/WebfrontCore/Views/Client/Profile/Meta/_ConnectionHistoryResponse.cshtml +++ b/WebfrontCore/Views/Client/Profile/Meta/_ConnectionHistoryResponse.cshtml @@ -1,4 +1,5 @@ @using Data.Models +@using SharedLibraryCore @model SharedLibraryCore.Dtos.Meta.Responses.ConnectionHistoryResponse @{ var localizationKey = $"WEBFRONT_CLIENT_META_CONNECTION_{Model.ConnectionType.ToString().ToUpper()}"; diff --git a/WebfrontCore/Views/Client/Profile/Meta/_Information.cshtml b/WebfrontCore/Views/Client/Profile/Meta/_Information.cshtml index fd33a204..4683b7b2 100644 --- a/WebfrontCore/Views/Client/Profile/Meta/_Information.cshtml +++ b/WebfrontCore/Views/Client/Profile/Meta/_Information.cshtml @@ -1,4 +1,5 @@ @using Humanizer +@using SharedLibraryCore @model IEnumerable @{ var informationMeta = Model diff --git a/WebfrontCore/Views/Client/Profile/Meta/_MessageResponse.cshtml b/WebfrontCore/Views/Client/Profile/Meta/_MessageResponse.cshtml index b3ccf0cc..c20b1a7b 100644 --- a/WebfrontCore/Views/Client/Profile/Meta/_MessageResponse.cshtml +++ b/WebfrontCore/Views/Client/Profile/Meta/_MessageResponse.cshtml @@ -1,4 +1,5 @@ -@using SharedLibraryCore.Dtos.Meta.Responses +@using SharedLibraryCore +@using SharedLibraryCore.Dtos.Meta.Responses @model MessageResponse @if (TempData["ShowMetaHeader"] as bool? ?? false) diff --git a/WebfrontCore/Views/Client/Profile/Meta/_MetaHeader.cshtml b/WebfrontCore/Views/Client/Profile/Meta/_MetaHeader.cshtml index b4886896..9197ce0a 100644 --- a/WebfrontCore/Views/Client/Profile/Meta/_MetaHeader.cshtml +++ b/WebfrontCore/Views/Client/Profile/Meta/_MetaHeader.cshtml @@ -1,4 +1,5 @@ -@model DateTime +@using SharedLibraryCore +@model DateTime @{ Layout = null;}
@Model.HumanizeForCurrentCulture() diff --git a/WebfrontCore/Views/Client/Profile/Meta/_PermissionLevelChangedResponse.cshtml b/WebfrontCore/Views/Client/Profile/Meta/_PermissionLevelChangedResponse.cshtml index 49f3bcb1..42a4be90 100644 --- a/WebfrontCore/Views/Client/Profile/Meta/_PermissionLevelChangedResponse.cshtml +++ b/WebfrontCore/Views/Client/Profile/Meta/_PermissionLevelChangedResponse.cshtml @@ -1,4 +1,5 @@ -@model SharedLibraryCore.Dtos.Meta.Responses.PermissionLevelChangedResponse +@using SharedLibraryCore +@model SharedLibraryCore.Dtos.Meta.Responses.PermissionLevelChangedResponse @if (TempData["ShowMetaHeader"] as bool? ?? false) diff --git a/WebfrontCore/Views/Client/Profile/Meta/_ReceivedPenaltyResponse.cshtml b/WebfrontCore/Views/Client/Profile/Meta/_ReceivedPenaltyResponse.cshtml index 30809f3f..f5c1ccd6 100644 --- a/WebfrontCore/Views/Client/Profile/Meta/_ReceivedPenaltyResponse.cshtml +++ b/WebfrontCore/Views/Client/Profile/Meta/_ReceivedPenaltyResponse.cshtml @@ -1,4 +1,6 @@ -@using SharedLibraryCore.Dtos.Meta.Responses +@using Microsoft.AspNetCore.Mvc.TagHelpers +@using SharedLibraryCore +@using SharedLibraryCore.Dtos.Meta.Responses @model ReceivedPenaltyResponse @{ diff --git a/WebfrontCore/Views/Client/Profile/Meta/_UpdatedAliasResponse.cshtml b/WebfrontCore/Views/Client/Profile/Meta/_UpdatedAliasResponse.cshtml index b20ab43d..b85e1eeb 100644 --- a/WebfrontCore/Views/Client/Profile/Meta/_UpdatedAliasResponse.cshtml +++ b/WebfrontCore/Views/Client/Profile/Meta/_UpdatedAliasResponse.cshtml @@ -1,4 +1,5 @@ -@using SharedLibraryCore.Dtos.Meta.Responses +@using SharedLibraryCore +@using SharedLibraryCore.Dtos.Meta.Responses @model UpdatedAliasResponse @if (TempData["ShowMetaHeader"] as bool? ?? false) diff --git a/WebfrontCore/Views/Client/Statistics/Advanced.cshtml b/WebfrontCore/Views/Client/Statistics/Advanced.cshtml index bbf44930..09b80ce8 100644 --- a/WebfrontCore/Views/Client/Statistics/Advanced.cshtml +++ b/WebfrontCore/Views/Client/Statistics/Advanced.cshtml @@ -1,15 +1,17 @@ @using SharedLibraryCore.Configuration @using Data.Models.Client.Stats -@using Stats.Helpers @using Data.Models.Client @using Data.Models.Client.Stats.Reference @using Humanizer @using Humanizer.Localisation -@using IW4MAdmin.Plugins.Stats -@using WebfrontCore.ViewModels @using System.Text.Json -@using IW4MAdmin.Plugins.Stats.Web.Dtos -@model Stats.Dtos.AdvancedStatsInfo +@using IW4MAdmin.Plugins.Stats +@using IW4MAdmin.Plugins.Stats.Dtos +@using IW4MAdmin.Plugins.Stats.Helpers +@using IW4MAdmin.WebfrontCore.ViewModels +@using SharedLibraryCore +@using Stats +@model IW4MAdmin.Plugins.Stats.Dtos.AdvancedStatsInfo @{ ViewBag.Title = ViewBag.Localization["WEBFRONT_ADV_STATS_TITLE"]; diff --git a/WebfrontCore/Views/Client/Statistics/Components/TopPlayers/_List.cshtml b/WebfrontCore/Views/Client/Statistics/Components/TopPlayers/_List.cshtml index f4bbb0ac..2fc9a7fe 100644 --- a/WebfrontCore/Views/Client/Statistics/Components/TopPlayers/_List.cshtml +++ b/WebfrontCore/Views/Client/Statistics/Components/TopPlayers/_List.cshtml @@ -1,6 +1,8 @@ -@using IW4MAdmin.Plugins.Stats -@using System.Text.Json -@model List +@using System.Text.Json +@using IW4MAdmin.Plugins.Stats +@using SharedLibraryCore +@using Stats +@model List @{ Layout = null; var loc = Utilities.CurrentLocalization.LocalizationIndex.Set; diff --git a/WebfrontCore/Views/Client/Statistics/Index.cshtml b/WebfrontCore/Views/Client/Statistics/Index.cshtml index cbf76fbd..66dc621e 100644 --- a/WebfrontCore/Views/Client/Statistics/Index.cshtml +++ b/WebfrontCore/Views/Client/Statistics/Index.cshtml @@ -1,5 +1,6 @@ @model IEnumerable -@using WebfrontCore.ViewModels +@using IW4MAdmin.WebfrontCore.ViewModels +@using SharedLibraryCore
diff --git a/WebfrontCore/Views/Client/_PenaltyInfo.cshtml b/WebfrontCore/Views/Client/_PenaltyInfo.cshtml index fcead07a..f92061d7 100644 --- a/WebfrontCore/Views/Client/_PenaltyInfo.cshtml +++ b/WebfrontCore/Views/Client/_PenaltyInfo.cshtml @@ -1,4 +1,5 @@ -@model IEnumerable +@using SharedLibraryCore +@model IEnumerable @{ Layout = null; } diff --git a/WebfrontCore/Views/Configuration/Files.cshtml b/WebfrontCore/Views/Configuration/Files.cshtml index 9f848ef9..d8e229c1 100644 --- a/WebfrontCore/Views/Configuration/Files.cshtml +++ b/WebfrontCore/Views/Configuration/Files.cshtml @@ -1,4 +1,5 @@ -@model IEnumerable +@using SharedLibraryCore +@model IEnumerable @{ ViewData["Title"] = Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_CONFIGURATION_TITLE"]; var noticeText = Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_CONFIGURATION_SAVING_CHANGES"]; diff --git a/WebfrontCore/Views/Configuration/_ListItem.cshtml b/WebfrontCore/Views/Configuration/_ListItem.cshtml index 57af4b2d..c36fde14 100644 --- a/WebfrontCore/Views/Configuration/_ListItem.cshtml +++ b/WebfrontCore/Views/Configuration/_ListItem.cshtml @@ -1,4 +1,4 @@ -@model WebfrontCore.ViewModels.BindingHelper +@model IW4MAdmin.WebfrontCore.ViewModels.BindingHelper @if (Model.Properties.Length == 1) { diff --git a/WebfrontCore/Views/Console/Index.cshtml b/WebfrontCore/Views/Console/Index.cshtml index 714ba2f7..d51165d0 100644 --- a/WebfrontCore/Views/Console/Index.cshtml +++ b/WebfrontCore/Views/Console/Index.cshtml @@ -1,4 +1,5 @@ -@model IEnumerable +@using SharedLibraryCore +@model IEnumerable

Web Console

diff --git a/WebfrontCore/Views/Home/Help.cshtml b/WebfrontCore/Views/Home/Help.cshtml index 5aa15de8..6a0c7137 100644 --- a/WebfrontCore/Views/Home/Help.cshtml +++ b/WebfrontCore/Views/Home/Help.cshtml @@ -1,4 +1,5 @@ -@model IEnumerable<(string, IEnumerable)> +@using SharedLibraryCore +@model IEnumerable<(string, IEnumerable)> @{ var loc = Utilities.CurrentLocalization.LocalizationIndex; } diff --git a/WebfrontCore/Views/Home/Index.cshtml b/WebfrontCore/Views/Home/Index.cshtml index 29ae81f1..a8bc04b6 100644 --- a/WebfrontCore/Views/Home/Index.cshtml +++ b/WebfrontCore/Views/Home/Index.cshtml @@ -1,5 +1,6 @@ -@using WebfrontCore.ViewModels -@using Humanizer +@using Humanizer +@using IW4MAdmin.WebfrontCore.ViewModels +@using SharedLibraryCore @model SharedLibraryCore.Dtos.IW4MAdminInfo @{ var loc = Utilities.CurrentLocalization.LocalizationIndex; diff --git a/WebfrontCore/Views/Penalty/List.cshtml b/WebfrontCore/Views/Penalty/List.cshtml index a65ea844..36fff473 100644 --- a/WebfrontCore/Views/Penalty/List.cshtml +++ b/WebfrontCore/Views/Penalty/List.cshtml @@ -1,5 +1,7 @@ -@using Humanizer -@using Data.Models +@using Data.Models +@using Humanizer +@using Microsoft.AspNetCore.Mvc.TagHelpers +@using SharedLibraryCore @model Data.Models.EFPenalty.PenaltyType @{ var loc = Utilities.CurrentLocalization.LocalizationIndex; @@ -68,7 +70,7 @@ - @await Component.InvokeAsync("PenaltyList", new WebfrontCore.ViewModels.PenaltyFilterInfo + @await Component.InvokeAsync("PenaltyList", new IW4MAdmin.WebfrontCore.ViewModels.PenaltyFilterInfo { Offset = 0, Count = 30, diff --git a/WebfrontCore/Views/Penalty/PenaltyInfoList.cshtml b/WebfrontCore/Views/Penalty/PenaltyInfoList.cshtml index afba53b0..36ee768c 100644 --- a/WebfrontCore/Views/Penalty/PenaltyInfoList.cshtml +++ b/WebfrontCore/Views/Penalty/PenaltyInfoList.cshtml @@ -1,12 +1,14 @@ -@{ +@using SharedLibraryCore.Dtos +@using Data.Models +@using IW4MAdmin.WebfrontCore.Permissions +@using SharedLibraryCore +@model IList + +@{ Layout = null; - + bool CanSeeLevel(PenaltyInfo penalty) => (ViewBag.PermissionsSet as IEnumerable).HasPermission(WebfrontEntity.ClientLevel, WebfrontPermission.Read) || penalty.PenaltyType == EFPenalty.PenaltyType.Report; } -@using WebfrontCore.Permissions -@using SharedLibraryCore.Dtos -@using Data.Models -@model IList @{ foreach (var penalty in Model.Where(CanSeeLevel)) diff --git a/WebfrontCore/Views/Penalty/_List.cshtml b/WebfrontCore/Views/Penalty/_List.cshtml index 9e4534c5..36f307fc 100644 --- a/WebfrontCore/Views/Penalty/_List.cshtml +++ b/WebfrontCore/Views/Penalty/_List.cshtml @@ -2,6 +2,6 @@ Layout = null; } -@model WebfrontCore.ViewModels.PenaltyFilterInfo +@model IW4MAdmin.WebfrontCore.ViewModels.PenaltyFilterInfo @await Component.InvokeAsync("PenaltyList", new { offset = Model.Offset, count = Model.Count, showOnly = Model.ShowOnly, ignoreAutomated = Model.IgnoreAutomated }) diff --git a/WebfrontCore/Views/Penalty/_Penalty.cshtml b/WebfrontCore/Views/Penalty/_Penalty.cshtml index a97c2439..844f58a2 100644 --- a/WebfrontCore/Views/Penalty/_Penalty.cshtml +++ b/WebfrontCore/Views/Penalty/_Penalty.cshtml @@ -7,7 +7,8 @@ var offenderLevelClass = canSeeLevel ? $"level-color-{Model.OffenderLevel.ToString().ToLower()}" : "text-light-dm text-dark-lm"; } -@using WebfrontCore.Permissions +@using IW4MAdmin.WebfrontCore.Permissions +@using SharedLibraryCore @model SharedLibraryCore.Dtos.PenaltyInfo diff --git a/WebfrontCore/Views/Plugins/LiveRadar/Radar/Index.cshtml b/WebfrontCore/Views/Plugins/LiveRadar/Radar/Index.cshtml index 76e3a887..208493cd 100644 --- a/WebfrontCore/Views/Plugins/LiveRadar/Radar/Index.cshtml +++ b/WebfrontCore/Views/Plugins/LiveRadar/Radar/Index.cshtml @@ -1,4 +1,5 @@ -@using WebfrontCore.ViewModels +@using IW4MAdmin.WebfrontCore.ViewModels +@using SharedLibraryCore @model IEnumerable