From 77bf0710dff977d9cd5de440989c78c6ccdaad9b Mon Sep 17 00:00:00 2001 From: RaidMax Date: Sat, 24 Mar 2018 23:32:54 -0500 Subject: [PATCH] Added AfterPublish commands to copy files to the right directory on publish fixed profile name not being centered if no aliases removed old build event command lines --- IW4MAdmin.sln | 47 ++++++++++--------- Plugins/SimpleStats/Cheat/Detection.cs | 2 +- Plugins/SimpleStats/Commands/TopStats.cs | 4 +- SharedLibrary/SharedLibrary.csproj | 33 +++++-------- WebfrontCore/Application/Main.cs | 3 -- WebfrontCore/Application/Manager.cs | 5 +- WebfrontCore/Application/Server.cs | 2 +- .../PublishProfiles/USBPublish.pubxml | 21 +++++++++ .../Views/Client/Profile/Index.cshtml | 3 +- WebfrontCore/Views/Shared/_Layout.cshtml | 4 +- WebfrontCore/WebfrontCore.csproj | 12 ++--- 11 files changed, 72 insertions(+), 64 deletions(-) create mode 100644 WebfrontCore/Properties/PublishProfiles/USBPublish.pubxml diff --git a/IW4MAdmin.sln b/IW4MAdmin.sln index 55ee55aef..1d1ffac27 100644 --- a/IW4MAdmin.sln +++ b/IW4MAdmin.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.27004.2006 +VisualStudioVersion = 15.0.26730.16 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StatsPlugin", "Plugins\SimpleStats\StatsPlugin.csproj", "{4785AB75-66F3-4391-985D-63A5A049A0FA}" ProjectSection(ProjectDependencies) = postProject @@ -24,6 +24,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8C8F3945-0AEF-4949-A1F7-B18E952E50BC}" ProjectSection(SolutionItems) = preProject _customcallbacks.gsc = _customcallbacks.gsc + AfterPublish.bat = AfterPublish.bat README.md = README.md version.txt = version.txt EndProjectSection @@ -52,20 +53,20 @@ Global Release-Stable|x86 = Release-Stable|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4785AB75-66F3-4391-985D-63A5A049A0FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4785AB75-66F3-4391-985D-63A5A049A0FA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4785AB75-66F3-4391-985D-63A5A049A0FA}.Debug|Any CPU.ActiveCfg = Debug|x86 + {4785AB75-66F3-4391-985D-63A5A049A0FA}.Debug|Any CPU.Build.0 = Debug|x86 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Debug|Mixed Platforms.Build.0 = Debug|x86 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Debug|x64.ActiveCfg = Debug|x64 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Debug|x64.Build.0 = Debug|x64 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Debug|x86.ActiveCfg = Debug|x86 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Debug|x86.Build.0 = Debug|x86 - {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|Any CPU.Build.0 = Debug|Any CPU + {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|Any CPU.ActiveCfg = Release|x86 + {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|Any CPU.Build.0 = Release|x86 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|Mixed Platforms.ActiveCfg = Release-Stable|x86 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|Mixed Platforms.Build.0 = Release-Stable|x86 - {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|x64.ActiveCfg = Release-Nightly|x64 - {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|x64.Build.0 = Release-Nightly|x64 + {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|x64.ActiveCfg = Release|x64 + {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|x64.Build.0 = Release|x64 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|x86.ActiveCfg = Release|x86 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|x86.Build.0 = Release|x86 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU @@ -84,20 +85,20 @@ Global {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|x64.Build.0 = Release-Stable|x64 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|x86.ActiveCfg = Release-Stable|x86 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|x86.Build.0 = Release-Stable|x86 - {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Debug|Any CPU.ActiveCfg = Debug|x86 + {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Debug|Any CPU.Build.0 = Debug|x86 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Debug|Mixed Platforms.Build.0 = Debug|x86 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Debug|x64.ActiveCfg = Debug|x64 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Debug|x64.Build.0 = Debug|x64 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Debug|x86.ActiveCfg = Debug|x86 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Debug|x86.Build.0 = Debug|x86 - {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|Any CPU.Build.0 = Debug|Any CPU + {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|Any CPU.ActiveCfg = Release|x86 + {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|Any CPU.Build.0 = Release|x86 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|Mixed Platforms.ActiveCfg = Release-Stable|x86 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|Mixed Platforms.Build.0 = Release-Stable|x86 - {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|x64.ActiveCfg = Release-Nightly|x64 - {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|x64.Build.0 = Release-Nightly|x64 + {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|x64.ActiveCfg = Release|x64 + {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|x64.Build.0 = Release|x64 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|x86.ActiveCfg = Release|x86 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|x86.Build.0 = Release|x86 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU @@ -116,20 +117,20 @@ Global {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Stable|x64.Build.0 = Release-Stable|x64 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Stable|x86.ActiveCfg = Release-Stable|x86 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Stable|x86.Build.0 = Release-Stable|x86 - {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Debug|Any CPU.ActiveCfg = Debug|x86 + {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Debug|Any CPU.Build.0 = Debug|x86 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Debug|Mixed Platforms.Build.0 = Debug|x86 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Debug|x64.ActiveCfg = Debug|x64 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Debug|x64.Build.0 = Debug|x64 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Debug|x86.ActiveCfg = Debug|x86 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Debug|x86.Build.0 = Debug|x86 - {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|Any CPU.Build.0 = Debug|Any CPU + {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|Any CPU.ActiveCfg = Release|x86 + {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|Any CPU.Build.0 = Release|x86 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|Mixed Platforms.ActiveCfg = Release-Stable|x86 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|Mixed Platforms.Build.0 = Release-Stable|x86 - {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|x64.ActiveCfg = Release-Nightly|x64 - {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|x64.Build.0 = Release-Nightly|x64 + {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|x64.ActiveCfg = Release|x64 + {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|x64.Build.0 = Release|x64 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|x86.ActiveCfg = Release|x86 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|x86.Build.0 = Release|x86 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU @@ -238,16 +239,16 @@ Global {B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|x64.Build.0 = Release-Stable|Any CPU {B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|x86.ActiveCfg = Release-Stable|Any CPU {B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|x86.Build.0 = Release-Stable|Any CPU - {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|Any CPU.ActiveCfg = Debug|x86 + {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|Any CPU.Build.0 = Debug|x86 {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|x64.ActiveCfg = Debug|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|x64.Build.0 = Debug|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|x86.ActiveCfg = Debug|x86 {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|x86.Build.0 = Debug|x86 - {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|Any CPU.Build.0 = Release|Any CPU + {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|Any CPU.ActiveCfg = Release|x86 + {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|Any CPU.Build.0 = Release|x86 {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|Mixed Platforms.Build.0 = Release|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|x64.ActiveCfg = Release|Any CPU diff --git a/Plugins/SimpleStats/Cheat/Detection.cs b/Plugins/SimpleStats/Cheat/Detection.cs index c740b2b0d..5ef06890b 100644 --- a/Plugins/SimpleStats/Cheat/Detection.cs +++ b/Plugins/SimpleStats/Cheat/Detection.cs @@ -57,7 +57,7 @@ namespace StatsPlugin.Cheat var trueVector = Vector3.Subtract(kill.KillOrigin, kill.DeathOrigin); var calculatedVector = Vector3.Subtract(kill.KillOrigin, new Vector3((float)x, (float)y, (float)z)); double angle = trueVector.AngleBetween(calculatedVector); - Console.WriteLine(((float)angle).ToDegrees()); + // Console.WriteLine(((float)angle).ToDegrees()); #endregion diff --git a/Plugins/SimpleStats/Commands/TopStats.cs b/Plugins/SimpleStats/Commands/TopStats.cs index 409700700..db602da62 100644 --- a/Plugins/SimpleStats/Commands/TopStats.cs +++ b/Plugins/SimpleStats/Commands/TopStats.cs @@ -17,10 +17,12 @@ namespace StatsPlugin.Commands public override async Task ExecuteAsync(Event E) { var statsSvc = new GenericRepository(); - int serverId = E.Origin.GetHashCode(); + int serverId = E.Owner.GetHashCode(); var iqStats = statsSvc.GetQuery(cs => cs.ServerId == serverId); var topStats = iqStats.Where(cs => cs.Skill > 100) + .Where(cs => cs.TimePlayed >= 3600) + .Where(cs => cs.Client.Level != Player.Permission.Banned) .OrderByDescending(cs => cs.Skill) .Take(5) .ToList(); diff --git a/SharedLibrary/SharedLibrary.csproj b/SharedLibrary/SharedLibrary.csproj index c7fa0e8ef..758b9f1e6 100644 --- a/SharedLibrary/SharedLibrary.csproj +++ b/SharedLibrary/SharedLibrary.csproj @@ -209,15 +209,15 @@ - - - - - - - - - + + + + + + + + + @@ -256,19 +256,12 @@ - copy /Y "$(TargetDir)$(TargetName).dll" "$(SolutionDir)BUILD\lib" -copy /Y "$(TargetDir)$(TargetName).dll" "$(SolutionDir)Admin\lib" - -if not exist "$(ProjectDir)LibSQLCE\x86" md "$(TargetDir)x86" - xcopy /s /y "$(ProjectDir)LibSQLCE\x86\*.*" "$(TargetDir)x86" - - -xcopy /Y /I /E "$(TargetDir)*" "$(SolutionDir)BUILD\Lib" + if not exist "$(ProjectDir)LibSQLCE\x86" md "$(TargetDir)x86" +xcopy /y "$(ProjectDir)LibSQLCE\x86" "$(TargetDir)x86\" + - -if not exist "$(SolutionDir)BUILD" mkdir "$(SolutionDir)BUILD" -if not exist "$(SolutionDir)BUILD\Lib" mkdir "$(SolutionDir)BUILD\Lib" + if not exist "$(SolutionDir)BUILD" mkdir "$(SolutionDir)BUILD" if not exist "$(SolutionDir)BUILD\userraw\scripts" mkdir "$(SolutionDir)BUILD\userraw\scripts" + + + FileSystem + FileSystem + Release + x86 + + True + False + 65340d7d-5831-406c-acad-b13ba634bde2 + D:\IW4M-Admin\Publish + False + net452 + win7-x86 + + \ No newline at end of file diff --git a/WebfrontCore/Views/Client/Profile/Index.cshtml b/WebfrontCore/Views/Client/Profile/Index.cshtml index 0e707b7ae..d61de3dd8 100644 --- a/WebfrontCore/Views/Client/Profile/Index.cshtml +++ b/WebfrontCore/Views/Client/Profile/Index.cshtml @@ -2,6 +2,7 @@ @{ string match = System.Text.RegularExpressions.Regex.Match(Model.Name.ToUpper(), "[A-Z]").Value; string shortCode = match == string.Empty ? "?" : match; + string marginClass = Model.Aliases.Count > 0 ? "mr-4" : ""; }
@@ -12,7 +13,7 @@

- + @Model.Name @if (Model.Aliases.Count > 0 || ViewBag.Authorized) { diff --git a/WebfrontCore/Views/Shared/_Layout.cshtml b/WebfrontCore/Views/Shared/_Layout.cshtml index 9c12d99c1..9afb77e36 100644 --- a/WebfrontCore/Views/Shared/_Layout.cshtml +++ b/WebfrontCore/Views/Shared/_Layout.cshtml @@ -67,12 +67,12 @@

- + - + @RenderSection("scripts", required: false) diff --git a/WebfrontCore/WebfrontCore.csproj b/WebfrontCore/WebfrontCore.csproj index 50b2db1c1..f5099b959 100644 --- a/WebfrontCore/WebfrontCore.csproj +++ b/WebfrontCore/WebfrontCore.csproj @@ -19,10 +19,6 @@ bin\x86\Debug\ - - - - PreserveNewest @@ -45,12 +41,13 @@ - + + @@ -69,8 +66,7 @@ - - + + -