migrating Stats to .Net Core 2
moved buildscripts to application added publish profile
This commit is contained in:
parent
6d5c368954
commit
718087309c
@ -18,8 +18,32 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SharedLibraryCore\SharedLibraryCore.csproj" />
|
||||
<ProjectReference Include="..\WebfrontCore\WebfrontCore.csproj" />
|
||||
<None Remove="IW4MAdminSettings.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="IW4MAdminSettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SharedLibraryCore\SharedLibraryCore.csproj">
|
||||
<Private>true</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WebfrontCore\WebfrontCore.csproj">
|
||||
<Private>true</Private>
|
||||
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||
<Exec Command="call $(ProjectDir)BuildScripts\PreBuild.bat $(SolutionDir) $(ProjectDir) $(TargetDir) $(OutDir)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="call $(ProjectDir)BuildScripts\PostBuild.bat $(SolutionDir) $(ProjectDir) $(TargetDir) $(OutDir)

if $(ProjectDir) == "*Undefined*" (
call BuildScripts\PostPublish.bat $(SolutionDir)
)
" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
@ -1,12 +1,11 @@
|
||||
set SolutionDir=%1
|
||||
set ProjectDir=%2
|
||||
set TargetDir=%3
|
||||
set OutDir=%4
|
||||
|
||||
if not exist "%TargetDir%x86" (
|
||||
echo "Copying SQLCe binaries"
|
||||
md "%TargetDir%x86"
|
||||
xcopy /y "%SolutionDir%SharedLibraryCore\LibSQLCe\x86" "%TargetDir%x86\"
|
||||
)
|
||||
echo "Copying dependency configs"
|
||||
copy "%SolutionDir%WebfrontCore\%OutDir%*.deps.json" "%TargetDir%"
|
||||
copy "%SolutionDir%SharedLibaryCore\%OutDir%*.deps.json" "%TargetDir%"
|
||||
|
||||
if not exist "%TargetDir%Plugins" (
|
||||
echo "Making plugin dir"
|
5
Application/BuildScripts/PostPublish.bat
Normal file
5
Application/BuildScripts/PostPublish.bat
Normal file
@ -0,0 +1,5 @@
|
||||
set SolutionDir=%1
|
||||
|
||||
;echo "Copying files for publish"
|
||||
;xcopy /Y "%SolutionDir%WebfrontCore\Views" "%SolutionDir%Publish\Windows\Views\"
|
||||
;xcopy /Y "%SolutionDir%WebfrontCore\wwwroot" "%SolutionDir%Publish\Windows\wwwroot\"
|
@ -1,3 +1,3 @@
|
||||
set SolutionDir=%1
|
||||
set ProjectDir=%2
|
||||
set TargetDir=%3
|
||||
set TargetDir=%3
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
@ -19,7 +19,7 @@ namespace IW4MAdmin.Application
|
||||
AppDomain.CurrentDomain.SetData("DataDirectory", OperatingDirectory);
|
||||
System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.BelowNormal;
|
||||
|
||||
Version = 1.6;
|
||||
Version = Assembly.GetExecutingAssembly().GetName().Version.Major + Assembly.GetExecutingAssembly().GetName().Version.Minor / 10.0f;
|
||||
|
||||
Console.WriteLine("=====================================================");
|
||||
Console.WriteLine(" IW4M ADMIN");
|
@ -318,5 +318,7 @@ namespace IW4MAdmin.Application
|
||||
public IDictionary<int, Player> GetPrivilegedClients() => PrivilegedClients;
|
||||
|
||||
public IEventApi GetEventApi() => Api;
|
||||
|
||||
public bool ShutdownRequested() => !Running;
|
||||
}
|
||||
}
|
@ -540,6 +540,7 @@ namespace IW4MAdmin
|
||||
}
|
||||
oldLines = lines;
|
||||
l_size = LogFile.Length();
|
||||
if (Manager.ShutdownRequested())
|
||||
{
|
||||
foreach (var plugin in SharedLibraryCore.Plugins.PluginImporter.ActivePlugins)
|
||||
await plugin.OnUnloadAsync();
|
158
IW4MAdmin.sln
158
IW4MAdmin.sln
@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
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}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WelcomePlugin", "Plugins\Welcome\WelcomePlugin.csproj", "{AF097E6B-48D5-4452-9CCF-0A81A21F341D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{26E8B310-269E-46D4-A612-24601F16065F}"
|
||||
@ -24,7 +22,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharedLibraryCore", "Shared
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebfrontCore", "WebfrontCore\WebfrontCore.csproj", "{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application", "Application\Application.csproj", "{B4626E78-BB22-43F8-A6AD-890B0853D61F}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Application", "Application\Application.csproj", "{B4626E78-BB22-43F8-A6AD-890B0853D61F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stats", "Plugins\Stats\Stats.csproj", "{98BE4A81-8AFD-4957-83F7-009D353C6BCB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -36,48 +36,8 @@ Global
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
Release-Nightly|Any CPU = Release-Nightly|Any CPU
|
||||
Release-Nightly|Mixed Platforms = Release-Nightly|Mixed Platforms
|
||||
Release-Nightly|x64 = Release-Nightly|x64
|
||||
Release-Nightly|x86 = Release-Nightly|x86
|
||||
Release-Stable|Any CPU = Release-Stable|Any CPU
|
||||
Release-Stable|Mixed Platforms = Release-Stable|Mixed Platforms
|
||||
Release-Stable|x64 = Release-Stable|x64
|
||||
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|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 = Release|Any CPU
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{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|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 = Debug|Any CPU
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Nightly|x86
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|Mixed Platforms.Build.0 = Release-Nightly|x86
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|x64.ActiveCfg = Release-Nightly|x64
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|x64.Build.0 = Release-Nightly|x64
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|x86.ActiveCfg = Release-Nightly|x86
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|x86.Build.0 = Release-Nightly|x86
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|x64.ActiveCfg = Release-Stable|x64
|
||||
{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
|
||||
{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|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
@ -94,22 +54,6 @@ Global
|
||||
{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 = Debug|Any CPU
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Nightly|x86
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|Mixed Platforms.Build.0 = Release-Nightly|x86
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|x64.ActiveCfg = Release-Nightly|x64
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|x64.Build.0 = Release-Nightly|x64
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|x86.ActiveCfg = Release-Nightly|x86
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|x86.Build.0 = Release-Nightly|x86
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|x64.ActiveCfg = Release-Stable|x64
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|x64.Build.0 = Release-Stable|x64
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|x86.ActiveCfg = Release-Stable|x86
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|x86.Build.0 = Release-Stable|x86
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
@ -126,20 +70,6 @@ Global
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release|x64.Build.0 = Release-Stable|Any CPU
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release|x86.ActiveCfg = Release-Stable|x86
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release|x86.Build.0 = Release-Stable|x86
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Nightly|x86
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|Mixed Platforms.Build.0 = Release-Nightly|x86
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|x64.ActiveCfg = Release-Nightly|Any CPU
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|Any CPU.ActiveCfg = Release-Stable|Any CPU
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
||||
{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
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
@ -156,22 +86,6 @@ Global
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release|x64.Build.0 = Release|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release|x86.ActiveCfg = Release|x86
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release|x86.Build.0 = Release|x86
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Nightly|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Nightly|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Nightly|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Nightly|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Nightly|x64.ActiveCfg = Release|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Nightly|x64.Build.0 = Release|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Nightly|x86.ActiveCfg = Release|x86
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Nightly|x86.Build.0 = Release|x86
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Stable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Stable|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Stable|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Stable|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Stable|x64.ActiveCfg = Release|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Stable|x64.Build.0 = Release|Any CPU
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Stable|x86.ActiveCfg = Release|x86
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033}.Release-Stable|x86.Build.0 = Release|x86
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
@ -188,22 +102,6 @@ Global
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release|x64.Build.0 = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release|x86.Build.0 = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Nightly|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Nightly|Any CPU.Build.0 = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Nightly|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Nightly|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Nightly|x64.ActiveCfg = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Nightly|x64.Build.0 = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Nightly|x86.ActiveCfg = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Nightly|x86.Build.0 = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Stable|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Stable|Any CPU.Build.0 = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Stable|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Stable|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Stable|x64.ActiveCfg = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Stable|x64.Build.0 = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Stable|x86.ActiveCfg = Release|Any CPU
|
||||
{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}.Release-Stable|x86.Build.0 = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
@ -220,22 +118,6 @@ Global
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release|x64.Build.0 = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release|x86.Build.0 = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Nightly|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Nightly|Any CPU.Build.0 = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Nightly|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Nightly|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Nightly|x64.ActiveCfg = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Nightly|x64.Build.0 = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Nightly|x86.ActiveCfg = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Nightly|x86.Build.0 = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Stable|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Stable|Any CPU.Build.0 = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Stable|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Stable|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Stable|x64.ActiveCfg = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Stable|x64.Build.0 = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Stable|x86.ActiveCfg = Release|Any CPU
|
||||
{D59AC1F1-2FB9-4BE7-813E-0CCCC4FE9067}.Release-Stable|x86.Build.0 = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
@ -252,31 +134,31 @@ Global
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Nightly|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Nightly|Any CPU.Build.0 = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Nightly|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Nightly|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Nightly|x64.ActiveCfg = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Nightly|x64.Build.0 = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Nightly|x86.ActiveCfg = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Nightly|x86.Build.0 = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Stable|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Stable|Any CPU.Build.0 = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Stable|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Stable|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Stable|x64.ActiveCfg = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Stable|x64.Build.0 = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Stable|x86.ActiveCfg = Release|Any CPU
|
||||
{B4626E78-BB22-43F8-A6AD-890B0853D61F}.Release-Stable|x86.Build.0 = Release|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Release|x64.Build.0 = Release|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{4785AB75-66F3-4391-985D-63A5A049A0FA} = {26E8B310-269E-46D4-A612-24601F16065F}
|
||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D} = {26E8B310-269E-46D4-A612-24601F16065F}
|
||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1} = {26E8B310-269E-46D4-A612-24601F16065F}
|
||||
{3EA31029-C76F-4C8E-AFD4-79F77DEA7033} = {26E8B310-269E-46D4-A612-24601F16065F}
|
||||
{98BE4A81-8AFD-4957-83F7-009D353C6BCB} = {26E8B310-269E-46D4-A612-24601F16065F}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {84F8F8E0-1F73-41E0-BD8D-BB6676E2EE87}
|
||||
|
@ -1,44 +0,0 @@
|
||||
using SharedLibrary;
|
||||
using SharedLibrary.Database.Models;
|
||||
using SharedLibrary.Services;
|
||||
using StatsPlugin.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Pages
|
||||
{
|
||||
public class ClientMessageJson : IPage
|
||||
{
|
||||
public string GetName() => "Client Chat JSON";
|
||||
public string GetPath() => "/_clientchat";
|
||||
public string GetContentType() => "application/json";
|
||||
public bool Visible() => false;
|
||||
|
||||
public async Task<HttpResponse> GetPage(NameValueCollection querySet, IDictionary<string, string> headers)
|
||||
{
|
||||
int clientId = Convert.ToInt32(querySet["clientid"]);
|
||||
var messageSvc = new GenericRepository<EFClientMessage>();
|
||||
var clientMessages = (await messageSvc.FindAsync(m => m.ClientId == clientId));
|
||||
|
||||
HttpResponse resp = new HttpResponse()
|
||||
{
|
||||
contentType = GetContentType(),
|
||||
content = clientMessages.Select(c => new
|
||||
{
|
||||
ClientID = c.ClientId,
|
||||
ServerID = c.ServerId,
|
||||
c.Message,
|
||||
c.TimeSent,
|
||||
ClientName = c.Client.Name,
|
||||
}),
|
||||
additionalHeaders = new Dictionary<string, string>()
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
using SharedLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Pages
|
||||
{
|
||||
public class ClientMessages : HTMLPage
|
||||
{
|
||||
public ClientMessages() : base(false) { }
|
||||
|
||||
public override string GetContent(NameValueCollection querySet, IDictionary<string, string> headers)
|
||||
{
|
||||
StringBuilder S = new StringBuilder();
|
||||
S.Append(LoadHeader());
|
||||
|
||||
IFile chat = new IFile("webfront\\chat.html");
|
||||
S.Append(chat.GetText());
|
||||
chat.Close();
|
||||
|
||||
S.Append(LoadFooter());
|
||||
|
||||
return S.ToString();
|
||||
}
|
||||
|
||||
public override string GetName() => "Word Cloud";
|
||||
public override string GetPath() => "/chat";
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
using SharedLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Pages
|
||||
{
|
||||
public class LiveStats : HTMLPage
|
||||
{
|
||||
public LiveStats() : base(false) { }
|
||||
|
||||
public override string GetContent(NameValueCollection querySet, IDictionary<string, string> headers)
|
||||
{
|
||||
StringBuilder S = new StringBuilder();
|
||||
S.Append(LoadHeader());
|
||||
|
||||
IFile stats = new IFile("webfront\\stats.html");
|
||||
S.Append(stats.GetText());
|
||||
stats.Close();
|
||||
|
||||
S.Append(LoadFooter());
|
||||
|
||||
return S.ToString();
|
||||
}
|
||||
|
||||
public override string GetName() => "Server Stats";
|
||||
public override string GetPath() => "/stats";
|
||||
}
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
using SharedLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Pages
|
||||
{
|
||||
class LiveStatsJson : IPage
|
||||
{
|
||||
public string GetName() => "Kill Stats JSON";
|
||||
public string GetPath() => "/_killstats";
|
||||
public string GetContentType() => "application/json";
|
||||
public bool Visible() => false;
|
||||
|
||||
public async Task<HttpResponse> GetPage(NameValueCollection querySet, IDictionary<string, string> headers)
|
||||
{
|
||||
// todo: redo this
|
||||
return await Task.FromResult(new HttpResponse());
|
||||
/*int selectCount = Stats.MAX_KILLEVENTS;
|
||||
|
||||
if (querySet.Get("count") != null)
|
||||
selectCount = Int32.Parse(querySet.Get("count"));
|
||||
|
||||
HttpResponse resp = new HttpResponse()
|
||||
{
|
||||
contentType = GetContentType(),
|
||||
content = new
|
||||
{
|
||||
Servers = Stats.ManagerInstance.GetServers().Select(s => new
|
||||
{
|
||||
ServerName = s.Hostname,
|
||||
ServerMap = s.CurrentMap.Alias,
|
||||
ServerInfo = Stats.ServerStats[s.GetPort()],
|
||||
Minimap = MinimapConfig.Read(@"Config\minimaps.cfg").MapInfo.Where(m => m.MapName == s.CurrentMap.Name),
|
||||
MapKills = selectCount < 999 ? Stats.ServerStats[s.GetPort()].GetKillQueue().ToArray()
|
||||
.Skip(Math.Min(Stats.MAX_KILLEVENTS - selectCount, Stats.ServerStats[s.GetPort()].GetKillQueue().Count - selectCount)) :
|
||||
Stats.statLists.FirstOrDefault(x => x.Port == s.GetPort()).playerStats.GetKillsByMap(s.CurrentMap, selectCount)
|
||||
})
|
||||
},
|
||||
additionalHeaders = new Dictionary<string, string>()
|
||||
};
|
||||
return resp;*/
|
||||
}
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
using SharedLibrary;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Pages
|
||||
{
|
||||
|
||||
public class WordCloudJson : IPage
|
||||
{
|
||||
public string GetName() => "Word Cloud JSON";
|
||||
public string GetPath() => "/_words";
|
||||
public string GetContentType() => "application/json";
|
||||
public bool Visible() => false;
|
||||
|
||||
public async Task<HttpResponse> GetPage(NameValueCollection querySet, IDictionary<string, string> headers)
|
||||
{
|
||||
// todo: this
|
||||
HttpResponse resp = new HttpResponse()
|
||||
{
|
||||
contentType = GetContentType(),
|
||||
content = null,
|
||||
additionalHeaders = new Dictionary<string, string>()
|
||||
};
|
||||
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SamplePlugin")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SamplePlugin")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("1d848d36-bf25-4bc0-acdd-67db2d014d45")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -1,168 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{4785AB75-66F3-4391-985D-63A5A049A0FA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>StatsPlugin</RootNamespace>
|
||||
<AssemblyName>StatsPlugin</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Nightly|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-Stable|AnyCPU'">
|
||||
<OutputPath>bin\Release-Stable\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Nightly|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<Optimize>true</Optimize>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-Stable|x86'">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<OutputPath>bin\x86\Release-Stable\</OutputPath>
|
||||
<Optimize>true</Optimize>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-Nightly|x64'">
|
||||
<OutputPath>bin\x64\Release-Nightly\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-Stable|x64'">
|
||||
<OutputPath>bin\x64\Release-Stable\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<Optimize>true</Optimize>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Cheat\Detection.cs" />
|
||||
<Compile Include="Cheat\DetectionPenaltyResult.cs" />
|
||||
<Compile Include="Cheat\Thresholds.cs" />
|
||||
<Compile Include="Commands\ResetStats.cs" />
|
||||
<Compile Include="Commands\TopStats.cs" />
|
||||
<Compile Include="Commands\ViewStats.cs" />
|
||||
<Compile Include="Config\StreakMessageConfiguration.cs" />
|
||||
<Compile Include="Config\StatsConfiguration.cs" />
|
||||
<Compile Include="Helpers\Extensions.cs" />
|
||||
<Compile Include="Helpers\ServerStats.cs" />
|
||||
<Compile Include="Helpers\StatManager.cs" />
|
||||
<Compile Include="Helpers\StreakMessage.cs" />
|
||||
<Compile Include="Helpers\ThreadSafeStatsService.cs" />
|
||||
<Compile Include="IW4Info.cs" />
|
||||
<Compile Include="MinimapConfig.cs" />
|
||||
<Compile Include="Models\EFClientKill.cs" />
|
||||
<Compile Include="Models\EFClientMessage.cs" />
|
||||
<Compile Include="Models\EFHitLocationCount.cs" />
|
||||
<Compile Include="Models\EFServer.cs" />
|
||||
<Compile Include="Models\EFClientStatistics.cs" />
|
||||
<Compile Include="Models\EFServerStatistics.cs" />
|
||||
<None Include="Pages\ClientMessages.cs" />
|
||||
<None Include="Pages\ClientMessageJson.cs" />
|
||||
<None Include="Pages\LiveStats.cs" />
|
||||
<None Include="Pages\LiveStatsJson.cs" />
|
||||
<None Include="Pages\WordCloudJson.cs" />
|
||||
<Compile Include="Plugin.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SharedLibrary\SharedLibrary.csproj">
|
||||
<Project>{d51eeceb-438a-47da-870f-7d7b41bc24d6}</Project>
|
||||
<Name>SharedLibrary</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent Condition=" '$(OS)' != 'Unix' ">copy /Y "$(TargetDir)$(TargetName).dll" "$(SolutionDir)BUILD\plugins\"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
@ -1,44 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin
|
||||
{
|
||||
public class Vector3
|
||||
{
|
||||
public float X { get; private set; }
|
||||
public float Y { get; private set; }
|
||||
public float Z { get; private set; }
|
||||
|
||||
public Vector3(float x, float y, float z)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
Z = z;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"({X}, {Y}, {Z})";
|
||||
}
|
||||
|
||||
public static Vector3 Parse(string s)
|
||||
{
|
||||
bool valid = Regex.Match(s, @"\(-?[0-9]+.?[0-9]*,\ -?[0-9]+.?[0-9]*,\ -?[0-9]+.?[0-9]*\)").Success;
|
||||
if (!valid)
|
||||
throw new FormatException("Vector3 is not in correct format");
|
||||
|
||||
string removeParenthesis = s.Substring(1, s.Length - 2);
|
||||
string[] eachPoint = removeParenthesis.Split(',');
|
||||
return new Vector3(float.Parse(eachPoint[0]), float.Parse(eachPoint[1]), float.Parse(eachPoint[2]));
|
||||
}
|
||||
|
||||
public static double Distance(Vector3 a, Vector3 b)
|
||||
{
|
||||
return Math.Round(Math.Sqrt(Math.Pow(b.X - a.X, 2) + Math.Pow(b.Y - a.Y, 2) + Math.Pow(b.Z - a.Z, 2)), 2);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,14 +1,14 @@
|
||||
using SharedLibrary.Helpers;
|
||||
using SharedLibrary.Interfaces;
|
||||
using SharedLibrary.Objects;
|
||||
using StatsPlugin.Helpers;
|
||||
using StatsPlugin.Models;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.Objects;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using IW4MAdmin.Plugins.Stats.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace StatsPlugin.Cheat
|
||||
namespace IW4MAdmin.Plugins.Stats.Cheat
|
||||
{
|
||||
class Detection
|
||||
{
|
@ -1,11 +1,11 @@
|
||||
using SharedLibrary.Objects;
|
||||
using SharedLibraryCore.Objects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Cheat
|
||||
namespace IW4MAdmin.Plugins.Stats.Cheat
|
||||
{
|
||||
class DetectionPenaltyResult
|
||||
{
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Cheat
|
||||
namespace IW4MAdmin.Plugins.Stats.Cheat
|
||||
{
|
||||
class Thresholds
|
||||
{
|
@ -1,13 +1,13 @@
|
||||
using SharedLibrary;
|
||||
using SharedLibrary.Objects;
|
||||
using StatsPlugin.Models;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Objects;
|
||||
using IW4MAdmin.Plugins.Stats.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Commands
|
||||
namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
{
|
||||
public class ResetStats : Command
|
||||
{
|
||||
@ -17,7 +17,7 @@ namespace StatsPlugin.Commands
|
||||
{
|
||||
if (E.Origin.ClientNumber >= 0)
|
||||
{
|
||||
var svc = new SharedLibrary.Services.GenericRepository<EFClientStatistics>();
|
||||
var svc = new SharedLibraryCore.Services.GenericRepository<EFClientStatistics>();
|
||||
int serverId = E.Owner.GetHashCode();
|
||||
var stats = svc.Find(s => s.ClientId == E.Origin.ClientId && s.ServerId == serverId).First();
|
||||
|
@ -1,14 +1,14 @@
|
||||
using SharedLibrary;
|
||||
using SharedLibrary.Objects;
|
||||
using SharedLibrary.Services;
|
||||
using StatsPlugin.Models;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Objects;
|
||||
using SharedLibraryCore.Services;
|
||||
using IW4MAdmin.Plugins.Stats.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Commands
|
||||
namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
{
|
||||
class TopStats : Command
|
||||
{
|
@ -1,14 +1,14 @@
|
||||
using SharedLibrary;
|
||||
using SharedLibrary.Objects;
|
||||
using SharedLibrary.Services;
|
||||
using StatsPlugin.Models;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Objects;
|
||||
using SharedLibraryCore.Services;
|
||||
using IW4MAdmin.Plugins.Stats.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Commands
|
||||
namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
{
|
||||
public class CViewStats : Command
|
||||
{
|
@ -1,12 +1,12 @@
|
||||
using SharedLibrary.Configuration;
|
||||
using SharedLibrary.Interfaces;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Config
|
||||
namespace IW4MAdmin.Plugins.Stats.Config
|
||||
{
|
||||
class StatsConfiguration : IBaseConfiguration
|
||||
{
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Config
|
||||
namespace IW4MAdmin.Plugins.Stats.Config
|
||||
{
|
||||
public class StreakMessageConfiguration
|
||||
{
|
@ -1,11 +1,11 @@
|
||||
using SharedLibrary.Helpers;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Helpers
|
||||
namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
{
|
||||
static class Extensions
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using SharedLibrary;
|
||||
using StatsPlugin.Cheat;
|
||||
using StatsPlugin.Models;
|
||||
using SharedLibraryCore;
|
||||
using IW4MAdmin.Plugins.Stats.Cheat;
|
||||
using IW4MAdmin.Plugins.Stats.Models;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
@ -8,7 +8,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Helpers
|
||||
namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
{
|
||||
class ServerStats {
|
||||
public ConcurrentDictionary<int, EFClientStatistics> PlayerStats { get; set; }
|
@ -3,17 +3,17 @@ using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using SharedLibrary;
|
||||
using SharedLibrary.Helpers;
|
||||
using SharedLibrary.Interfaces;
|
||||
using SharedLibrary.Objects;
|
||||
using SharedLibrary.Services;
|
||||
using StatsPlugin.Models;
|
||||
using SharedLibrary.Commands;
|
||||
using SharedLibrary.Configuration;
|
||||
using StatsPlugin.Config;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.Objects;
|
||||
using SharedLibraryCore.Services;
|
||||
using IW4MAdmin.Plugins.Stats.Models;
|
||||
using SharedLibraryCore.Commands;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
|
||||
namespace StatsPlugin.Helpers
|
||||
namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
{
|
||||
public class StatManager
|
||||
{
|
@ -1,12 +1,12 @@
|
||||
using SharedLibrary;
|
||||
using SharedLibrary.Helpers;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Helpers
|
||||
namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
{
|
||||
public class StreakMessage
|
||||
{
|
@ -1,12 +1,12 @@
|
||||
using SharedLibrary.Services;
|
||||
using StatsPlugin.Models;
|
||||
using SharedLibraryCore.Services;
|
||||
using IW4MAdmin.Plugins.Stats.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Helpers
|
||||
namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
{
|
||||
public class ThreadSafeStatsService
|
||||
{
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin
|
||||
namespace IW4MAdmin.Plugins.Stats
|
||||
{
|
||||
public class IW4Info
|
||||
{
|
@ -4,10 +4,10 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using SharedLibrary.Helpers;
|
||||
using SharedLibrary.Interfaces;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace StatsPlugin
|
||||
namespace IW4MAdmin.Plugins.Stats
|
||||
{
|
||||
public class MinimapInfo
|
||||
{
|
@ -1,11 +1,11 @@
|
||||
using System;
|
||||
|
||||
using SharedLibrary.Database.Models;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SharedLibrary.Helpers;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace StatsPlugin.Models
|
||||
namespace IW4MAdmin.Plugins.Stats.Models
|
||||
{
|
||||
public class EFClientKill : SharedEntity
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
using SharedLibrary.Database.Models;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
@ -7,7 +7,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StatsPlugin.Models
|
||||
namespace IW4MAdmin.Plugins.Stats.Models
|
||||
{
|
||||
public class EFClientMessage : SharedEntity
|
||||
{
|
@ -6,17 +6,17 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using SharedLibrary.Database.Models;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
|
||||
namespace StatsPlugin.Models
|
||||
namespace IW4MAdmin.Plugins.Stats.Models
|
||||
{
|
||||
public class EFClientStatistics : SharedEntity
|
||||
{
|
||||
[Key, Column(Order = 0)]
|
||||
//[Key, Column(Order = 0)]
|
||||
public int ClientId { get; set; }
|
||||
[ForeignKey("ClientId")]
|
||||
public virtual EFClient Client { get; set; }
|
||||
[Key, Column(Order = 1)]
|
||||
//[Key, Column(Order = 1)]
|
||||
public int ServerId { get; set; }
|
||||
[ForeignKey("ServerId")]
|
||||
public virtual EFServer Server { get; set; }
|
@ -1,7 +1,7 @@
|
||||
using SharedLibrary.Database.Models;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace StatsPlugin.Models
|
||||
namespace IW4MAdmin.Plugins.Stats.Models
|
||||
{
|
||||
public class EFHitLocationCount : SharedEntity
|
||||
{
|
@ -1,9 +1,9 @@
|
||||
|
||||
using SharedLibrary.Database.Models;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace StatsPlugin.Models
|
||||
namespace IW4MAdmin.Plugins.Stats.Models
|
||||
{
|
||||
public class EFServer : SharedEntity
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
using SharedLibrary.Database.Models;
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace StatsPlugin.Models
|
||||
namespace IW4MAdmin.Plugins.Stats.Models
|
||||
{
|
||||
public class EFServerStatistics : SharedEntity
|
||||
{
|
16
Plugins/Stats/Models/ModelConfiguration.cs
Normal file
16
Plugins/Stats/Models/ModelConfiguration.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using IW4MAdmin.Plugins.Stats.Models;
|
||||
|
||||
namespace Stats.Models
|
||||
{
|
||||
public class ModelConfiguration : IModelConfiguration
|
||||
{
|
||||
public void Configure(ModelBuilder builder)
|
||||
{
|
||||
builder.Entity<EFClientStatistics>()
|
||||
.HasKey(cs => new { cs.ClientId, cs.ServerId });
|
||||
}
|
||||
}
|
||||
}
|
@ -2,24 +2,25 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Reflection;
|
||||
|
||||
using SharedLibrary;
|
||||
using SharedLibrary.Configuration;
|
||||
using SharedLibrary.Dtos;
|
||||
using SharedLibrary.Helpers;
|
||||
using SharedLibrary.Interfaces;
|
||||
using SharedLibrary.Services;
|
||||
using StatsPlugin.Config;
|
||||
using StatsPlugin.Helpers;
|
||||
using StatsPlugin.Models;
|
||||
using SharedLibraryCore;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using SharedLibraryCore.Dtos;
|
||||
using SharedLibraryCore.Helpers;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using SharedLibraryCore.Services;
|
||||
using IW4MAdmin.Plugins.Stats.Config;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using IW4MAdmin.Plugins.Stats.Models;
|
||||
|
||||
namespace StatsPlugin
|
||||
namespace IW4MAdmin.Plugins.Stats
|
||||
{
|
||||
class Plugin : IPlugin
|
||||
{
|
||||
public string Name => "Simple Stats";
|
||||
|
||||
public float Version => 1.0f;
|
||||
public float Version => Assembly.GetExecutingAssembly().GetName().Version.Major + Assembly.GetExecutingAssembly().GetName().Version.Minor / 10.0f;
|
||||
|
||||
public string Author => "RaidMax";
|
||||
|
24
Plugins/Stats/Stats.csproj
Normal file
24
Plugins/Stats/Stats.csproj
Normal file
@ -0,0 +1,24 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<ApplicationIcon />
|
||||
<StartupObject />
|
||||
<PackageId>RaidMax.IW4MAdmin.Plugins.Stats</PackageId>
|
||||
<Authors>RaidMax</Authors>
|
||||
<Company>Forever None</Company>
|
||||
<Product>Client Statistics</Product>
|
||||
<Description>Client Statistics Plugin for IW4MAdmin</Description>
|
||||
<Copyright>2018</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SharedLibraryCore\SharedLibraryCore.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="copy "$(TargetPath)" $(SolutionDir)BUILD\Plugins"" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
@ -6,6 +6,7 @@ using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
|
||||
namespace SharedLibraryCore.Database
|
||||
{
|
||||
@ -83,7 +84,7 @@ namespace SharedLibraryCore.Database
|
||||
Assembly library;
|
||||
try
|
||||
{
|
||||
library = Assembly.LoadFile(dllPath);
|
||||
library = Assembly.LoadFrom(dllPath);
|
||||
}
|
||||
|
||||
// not a valid assembly, ie plugin files
|
||||
@ -91,14 +92,19 @@ namespace SharedLibraryCore.Database
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var configurations = library.ExportedTypes.Where(c => c.GetInterfaces().FirstOrDefault(i => typeof(IModelConfiguration).IsAssignableFrom(i)) != null)
|
||||
.Select( c => (IModelConfiguration)Activator.CreateInstance(c));
|
||||
|
||||
foreach (var configurable in configurations)
|
||||
configurable.Configure(modelBuilder);
|
||||
|
||||
foreach (var type in library.ExportedTypes)
|
||||
{
|
||||
if (type.IsClass && type.IsSubclassOf(typeof(SharedEntity)))
|
||||
{
|
||||
var method = modelBuilder.GetType().GetMethod("Entity");
|
||||
method = method.MakeGenericMethod(new Type[] { type });
|
||||
method.Invoke(modelBuilder, null);
|
||||
var method = modelBuilder.GetType().GetMethod("Entity", new[] { typeof(Type) });
|
||||
method.Invoke(modelBuilder, new[] { type });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
@ -9,6 +10,8 @@ namespace SharedLibraryCore.Helpers
|
||||
{
|
||||
public class Vector3
|
||||
{
|
||||
[Key]
|
||||
public int Vector3Id { get; set; }
|
||||
public float X { get; protected set; }
|
||||
public float Y { get; protected set; }
|
||||
public float Z { get; protected set; }
|
||||
|
@ -23,5 +23,6 @@ namespace SharedLibraryCore.Interfaces
|
||||
PenaltyService GetPenaltyService();
|
||||
IDictionary<int, Player> GetPrivilegedClients();
|
||||
IEventApi GetEventApi();
|
||||
bool ShutdownRequested();
|
||||
}
|
||||
}
|
||||
|
12
SharedLibraryCore/Interfaces/IModelConfiguration.cs
Normal file
12
SharedLibraryCore/Interfaces/IModelConfiguration.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SharedLibraryCore.Interfaces
|
||||
{
|
||||
public interface IModelConfiguration
|
||||
{
|
||||
void Configure(ModelBuilder builder);
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<noInheritable></noInheritable>
|
||||
<assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.30729.4148" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
|
||||
<file name="msvcr90.dll" hashalg="SHA1" hash="98e8006e0a4542e69f1a3555b927758bd76ca07d"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>+CXED+6HzJlSphyMNOn27ujadC0=</dsig:DigestValue></asmv2:hash></file> <file name="msvcp90.dll" hashalg="SHA1" hash="3aec3be680024a46813dee891a753bd58b3f3b12"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>MyKED+9DyS+1XcMeaC0Zlw2vFZ0=</dsig:DigestValue></asmv2:hash></file> <file name="msvcm90.dll" hashalg="SHA1" hash="0195dd0896d74b62531e4f3c771904a3d996450e"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>EeyDE7og6WoPd2oBhYbMEnpFHhY=</dsig:DigestValue></asmv2:hash></file>
|
||||
</assembly>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
415
SharedLibraryCore/Migrations/20180408213153_Initial Create.Designer.cs
generated
Normal file
415
SharedLibraryCore/Migrations/20180408213153_Initial Create.Designer.cs
generated
Normal file
@ -0,0 +1,415 @@
|
||||
// <auto-generated />
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Objects;
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[Migration("20180408213153_Initial Create")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.0.2-rtm-10011");
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientKill", b =>
|
||||
{
|
||||
b.Property<long>("KillId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("AttackerId");
|
||||
|
||||
b.Property<int>("Damage");
|
||||
|
||||
b.Property<int?>("DeathOriginVector3Id");
|
||||
|
||||
b.Property<int>("DeathType");
|
||||
|
||||
b.Property<int>("HitLoc");
|
||||
|
||||
b.Property<int?>("KillOriginVector3Id");
|
||||
|
||||
b.Property<int>("Map");
|
||||
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<int>("VictimId");
|
||||
|
||||
b.Property<int?>("ViewAnglesVector3Id");
|
||||
|
||||
b.Property<int>("Weapon");
|
||||
|
||||
b.Property<DateTime>("When");
|
||||
|
||||
b.HasKey("KillId");
|
||||
|
||||
b.HasIndex("AttackerId");
|
||||
|
||||
b.HasIndex("DeathOriginVector3Id");
|
||||
|
||||
b.HasIndex("KillOriginVector3Id");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.HasIndex("VictimId");
|
||||
|
||||
b.HasIndex("ViewAnglesVector3Id");
|
||||
|
||||
b.ToTable("EFClientKill");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientMessage", b =>
|
||||
{
|
||||
b.Property<long>("MessageId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("ClientId");
|
||||
|
||||
b.Property<string>("Message");
|
||||
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<DateTime>("TimeSent");
|
||||
|
||||
b.HasKey("MessageId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.ToTable("EFClientMessage");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics", b =>
|
||||
{
|
||||
b.Property<int>("ClientId");
|
||||
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("Deaths");
|
||||
|
||||
b.Property<int>("Kills");
|
||||
|
||||
b.Property<double>("SPM");
|
||||
|
||||
b.Property<double>("Skill");
|
||||
|
||||
b.Property<int>("TimePlayed");
|
||||
|
||||
b.HasKey("ClientId", "ServerId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.ToTable("EFClientStatistics");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFHitLocationCount", b =>
|
||||
{
|
||||
b.Property<int>("HitLocationCountId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int?>("EFClientStatisticsClientId");
|
||||
|
||||
b.Property<int?>("EFClientStatisticsServerId");
|
||||
|
||||
b.Property<int>("HitCount");
|
||||
|
||||
b.Property<float>("HitOffsetAverage");
|
||||
|
||||
b.Property<int>("Location");
|
||||
|
||||
b.HasKey("HitLocationCountId");
|
||||
|
||||
b.HasIndex("EFClientStatisticsClientId", "EFClientStatisticsServerId");
|
||||
|
||||
b.ToTable("EFHitLocationCount");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServer", b =>
|
||||
{
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("Port");
|
||||
|
||||
b.HasKey("ServerId");
|
||||
|
||||
b.ToTable("EFServer");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServerStatistics", b =>
|
||||
{
|
||||
b.Property<int>("StatisticId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<long>("TotalKills");
|
||||
|
||||
b.Property<long>("TotalPlayTime");
|
||||
|
||||
b.HasKey("StatisticId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.ToTable("EFServerStatistics");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAlias", b =>
|
||||
{
|
||||
b.Property<int>("AliasId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<DateTime>("DateAdded");
|
||||
|
||||
b.Property<int>("IPAddress");
|
||||
|
||||
b.Property<int>("LinkId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("AliasId");
|
||||
|
||||
b.HasIndex("LinkId");
|
||||
|
||||
b.ToTable("Aliases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAliasLink", b =>
|
||||
{
|
||||
b.Property<int>("AliasLinkId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.HasKey("AliasLinkId");
|
||||
|
||||
b.ToTable("AliasLinks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFClient", b =>
|
||||
{
|
||||
b.Property<int>("ClientId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("AliasLinkId");
|
||||
|
||||
b.Property<int>("Connections");
|
||||
|
||||
b.Property<int>("CurrentAliasId");
|
||||
|
||||
b.Property<DateTime>("FirstConnection");
|
||||
|
||||
b.Property<DateTime>("LastConnection");
|
||||
|
||||
b.Property<int>("Level");
|
||||
|
||||
b.Property<bool>("Masked");
|
||||
|
||||
b.Property<long>("NetworkId");
|
||||
|
||||
b.Property<string>("Password");
|
||||
|
||||
b.Property<string>("PasswordSalt");
|
||||
|
||||
b.Property<int>("TotalConnectionTime");
|
||||
|
||||
b.HasKey("ClientId");
|
||||
|
||||
b.HasIndex("AliasLinkId");
|
||||
|
||||
b.HasIndex("CurrentAliasId");
|
||||
|
||||
b.HasIndex("NetworkId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFPenalty", b =>
|
||||
{
|
||||
b.Property<int>("PenaltyId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<DateTime>("Expires");
|
||||
|
||||
b.Property<int>("LinkId");
|
||||
|
||||
b.Property<int>("OffenderId");
|
||||
|
||||
b.Property<string>("Offense")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("PunisherId");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.Property<DateTime>("When");
|
||||
|
||||
b.HasKey("PenaltyId");
|
||||
|
||||
b.HasIndex("LinkId");
|
||||
|
||||
b.HasIndex("OffenderId");
|
||||
|
||||
b.HasIndex("PunisherId");
|
||||
|
||||
b.ToTable("Penalties");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Helpers.Vector3", b =>
|
||||
{
|
||||
b.Property<int>("Vector3Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<float>("X");
|
||||
|
||||
b.Property<float>("Y");
|
||||
|
||||
b.Property<float>("Z");
|
||||
|
||||
b.HasKey("Vector3Id");
|
||||
|
||||
b.ToTable("Vector3");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientKill", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Attacker")
|
||||
.WithMany()
|
||||
.HasForeignKey("AttackerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "DeathOrigin")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeathOriginVector3Id");
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "KillOrigin")
|
||||
.WithMany()
|
||||
.HasForeignKey("KillOriginVector3Id");
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Victim")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "ViewAngles")
|
||||
.WithMany()
|
||||
.HasForeignKey("ViewAnglesVector3Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientMessage", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFHitLocationCount", b =>
|
||||
{
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics")
|
||||
.WithMany("HitLocations")
|
||||
.HasForeignKey("EFClientStatisticsClientId", "EFClientStatisticsServerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServerStatistics", b =>
|
||||
{
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAlias", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "Link")
|
||||
.WithMany("Children")
|
||||
.HasForeignKey("LinkId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFClient", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "AliasLink")
|
||||
.WithMany()
|
||||
.HasForeignKey("AliasLinkId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAlias", "CurrentAlias")
|
||||
.WithMany()
|
||||
.HasForeignKey("CurrentAliasId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFPenalty", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "Link")
|
||||
.WithMany("ReceivedPenalties")
|
||||
.HasForeignKey("LinkId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Offender")
|
||||
.WithMany("ReceivedPenalties")
|
||||
.HasForeignKey("OffenderId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Punisher")
|
||||
.WithMany("AdministeredPenalties")
|
||||
.HasForeignKey("PunisherId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
443
SharedLibraryCore/Migrations/20180408213153_Initial Create.cs
Normal file
443
SharedLibraryCore/Migrations/20180408213153_Initial Create.cs
Normal file
@ -0,0 +1,443 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
{
|
||||
public partial class InitialCreate : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AliasLinks",
|
||||
columns: table => new
|
||||
{
|
||||
AliasLinkId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Active = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AliasLinks", x => x.AliasLinkId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFServer",
|
||||
columns: table => new
|
||||
{
|
||||
ServerId = table.Column<int>(nullable: false),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
Port = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFServer", x => x.ServerId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Vector3",
|
||||
columns: table => new
|
||||
{
|
||||
Vector3Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
X = table.Column<float>(nullable: false),
|
||||
Y = table.Column<float>(nullable: false),
|
||||
Z = table.Column<float>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Vector3", x => x.Vector3Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Aliases",
|
||||
columns: table => new
|
||||
{
|
||||
AliasId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
DateAdded = table.Column<DateTime>(nullable: false),
|
||||
IPAddress = table.Column<int>(nullable: false),
|
||||
LinkId = table.Column<int>(nullable: false),
|
||||
Name = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Aliases", x => x.AliasId);
|
||||
table.ForeignKey(
|
||||
name: "FK_Aliases_AliasLinks_LinkId",
|
||||
column: x => x.LinkId,
|
||||
principalTable: "AliasLinks",
|
||||
principalColumn: "AliasLinkId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFServerStatistics",
|
||||
columns: table => new
|
||||
{
|
||||
StatisticId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
ServerId = table.Column<int>(nullable: false),
|
||||
TotalKills = table.Column<long>(nullable: false),
|
||||
TotalPlayTime = table.Column<long>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFServerStatistics", x => x.StatisticId);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFServerStatistics_EFServer_ServerId",
|
||||
column: x => x.ServerId,
|
||||
principalTable: "EFServer",
|
||||
principalColumn: "ServerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Clients",
|
||||
columns: table => new
|
||||
{
|
||||
ClientId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
AliasLinkId = table.Column<int>(nullable: false),
|
||||
Connections = table.Column<int>(nullable: false),
|
||||
CurrentAliasId = table.Column<int>(nullable: false),
|
||||
FirstConnection = table.Column<DateTime>(nullable: false),
|
||||
LastConnection = table.Column<DateTime>(nullable: false),
|
||||
Level = table.Column<int>(nullable: false),
|
||||
Masked = table.Column<bool>(nullable: false),
|
||||
NetworkId = table.Column<long>(nullable: false),
|
||||
Password = table.Column<string>(nullable: true),
|
||||
PasswordSalt = table.Column<string>(nullable: true),
|
||||
TotalConnectionTime = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Clients", x => x.ClientId);
|
||||
table.ForeignKey(
|
||||
name: "FK_Clients_AliasLinks_AliasLinkId",
|
||||
column: x => x.AliasLinkId,
|
||||
principalTable: "AliasLinks",
|
||||
principalColumn: "AliasLinkId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Clients_Aliases_CurrentAliasId",
|
||||
column: x => x.CurrentAliasId,
|
||||
principalTable: "Aliases",
|
||||
principalColumn: "AliasId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFClientKill",
|
||||
columns: table => new
|
||||
{
|
||||
KillId = table.Column<long>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
AttackerId = table.Column<int>(nullable: false),
|
||||
Damage = table.Column<int>(nullable: false),
|
||||
DeathOriginVector3Id = table.Column<int>(nullable: true),
|
||||
DeathType = table.Column<int>(nullable: false),
|
||||
HitLoc = table.Column<int>(nullable: false),
|
||||
KillOriginVector3Id = table.Column<int>(nullable: true),
|
||||
Map = table.Column<int>(nullable: false),
|
||||
ServerId = table.Column<int>(nullable: false),
|
||||
VictimId = table.Column<int>(nullable: false),
|
||||
ViewAnglesVector3Id = table.Column<int>(nullable: true),
|
||||
Weapon = table.Column<int>(nullable: false),
|
||||
When = table.Column<DateTime>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFClientKill", x => x.KillId);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientKill_Clients_AttackerId",
|
||||
column: x => x.AttackerId,
|
||||
principalTable: "Clients",
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientKill_Vector3_DeathOriginVector3Id",
|
||||
column: x => x.DeathOriginVector3Id,
|
||||
principalTable: "Vector3",
|
||||
principalColumn: "Vector3Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientKill_Vector3_KillOriginVector3Id",
|
||||
column: x => x.KillOriginVector3Id,
|
||||
principalTable: "Vector3",
|
||||
principalColumn: "Vector3Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientKill_EFServer_ServerId",
|
||||
column: x => x.ServerId,
|
||||
principalTable: "EFServer",
|
||||
principalColumn: "ServerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientKill_Clients_VictimId",
|
||||
column: x => x.VictimId,
|
||||
principalTable: "Clients",
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientKill_Vector3_ViewAnglesVector3Id",
|
||||
column: x => x.ViewAnglesVector3Id,
|
||||
principalTable: "Vector3",
|
||||
principalColumn: "Vector3Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFClientMessage",
|
||||
columns: table => new
|
||||
{
|
||||
MessageId = table.Column<long>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
ClientId = table.Column<int>(nullable: false),
|
||||
Message = table.Column<string>(nullable: true),
|
||||
ServerId = table.Column<int>(nullable: false),
|
||||
TimeSent = table.Column<DateTime>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFClientMessage", x => x.MessageId);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientMessage_Clients_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "Clients",
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientMessage_EFServer_ServerId",
|
||||
column: x => x.ServerId,
|
||||
principalTable: "EFServer",
|
||||
principalColumn: "ServerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFClientStatistics",
|
||||
columns: table => new
|
||||
{
|
||||
ClientId = table.Column<int>(nullable: false),
|
||||
ServerId = table.Column<int>(nullable: false),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
Deaths = table.Column<int>(nullable: false),
|
||||
Kills = table.Column<int>(nullable: false),
|
||||
SPM = table.Column<double>(nullable: false),
|
||||
Skill = table.Column<double>(nullable: false),
|
||||
TimePlayed = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFClientStatistics", x => new { x.ClientId, x.ServerId });
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientStatistics_Clients_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "Clients",
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientStatistics_EFServer_ServerId",
|
||||
column: x => x.ServerId,
|
||||
principalTable: "EFServer",
|
||||
principalColumn: "ServerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Penalties",
|
||||
columns: table => new
|
||||
{
|
||||
PenaltyId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
Expires = table.Column<DateTime>(nullable: false),
|
||||
LinkId = table.Column<int>(nullable: false),
|
||||
OffenderId = table.Column<int>(nullable: false),
|
||||
Offense = table.Column<string>(nullable: false),
|
||||
PunisherId = table.Column<int>(nullable: false),
|
||||
Type = table.Column<int>(nullable: false),
|
||||
When = table.Column<DateTime>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Penalties", x => x.PenaltyId);
|
||||
table.ForeignKey(
|
||||
name: "FK_Penalties_AliasLinks_LinkId",
|
||||
column: x => x.LinkId,
|
||||
principalTable: "AliasLinks",
|
||||
principalColumn: "AliasLinkId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Penalties_Clients_OffenderId",
|
||||
column: x => x.OffenderId,
|
||||
principalTable: "Clients",
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Penalties_Clients_PunisherId",
|
||||
column: x => x.PunisherId,
|
||||
principalTable: "Clients",
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFHitLocationCount",
|
||||
columns: table => new
|
||||
{
|
||||
HitLocationCountId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
EFClientStatisticsClientId = table.Column<int>(nullable: true),
|
||||
EFClientStatisticsServerId = table.Column<int>(nullable: true),
|
||||
HitCount = table.Column<int>(nullable: false),
|
||||
HitOffsetAverage = table.Column<float>(nullable: false),
|
||||
Location = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFHitLocationCount", x => x.HitLocationCountId);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFHitLocationCount_EFClientStatistics_EFClientStatisticsClientId_EFClientStatisticsServerId",
|
||||
columns: x => new { x.EFClientStatisticsClientId, x.EFClientStatisticsServerId },
|
||||
principalTable: "EFClientStatistics",
|
||||
principalColumns: new[] { "ClientId", "ServerId" },
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Aliases_LinkId",
|
||||
table: "Aliases",
|
||||
column: "LinkId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Clients_AliasLinkId",
|
||||
table: "Clients",
|
||||
column: "AliasLinkId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Clients_CurrentAliasId",
|
||||
table: "Clients",
|
||||
column: "CurrentAliasId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Clients_NetworkId",
|
||||
table: "Clients",
|
||||
column: "NetworkId",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientKill_AttackerId",
|
||||
table: "EFClientKill",
|
||||
column: "AttackerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientKill_DeathOriginVector3Id",
|
||||
table: "EFClientKill",
|
||||
column: "DeathOriginVector3Id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientKill_KillOriginVector3Id",
|
||||
table: "EFClientKill",
|
||||
column: "KillOriginVector3Id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientKill_ServerId",
|
||||
table: "EFClientKill",
|
||||
column: "ServerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientKill_VictimId",
|
||||
table: "EFClientKill",
|
||||
column: "VictimId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientKill_ViewAnglesVector3Id",
|
||||
table: "EFClientKill",
|
||||
column: "ViewAnglesVector3Id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientMessage_ClientId",
|
||||
table: "EFClientMessage",
|
||||
column: "ClientId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientMessage_ServerId",
|
||||
table: "EFClientMessage",
|
||||
column: "ServerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientStatistics_ServerId",
|
||||
table: "EFClientStatistics",
|
||||
column: "ServerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFHitLocationCount_EFClientStatisticsClientId_EFClientStatisticsServerId",
|
||||
table: "EFHitLocationCount",
|
||||
columns: new[] { "EFClientStatisticsClientId", "EFClientStatisticsServerId" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFServerStatistics_ServerId",
|
||||
table: "EFServerStatistics",
|
||||
column: "ServerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Penalties_LinkId",
|
||||
table: "Penalties",
|
||||
column: "LinkId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Penalties_OffenderId",
|
||||
table: "Penalties",
|
||||
column: "OffenderId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Penalties_PunisherId",
|
||||
table: "Penalties",
|
||||
column: "PunisherId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFClientKill");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFClientMessage");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFHitLocationCount");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFServerStatistics");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Penalties");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Vector3");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFClientStatistics");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Clients");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFServer");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Aliases");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AliasLinks");
|
||||
}
|
||||
}
|
||||
}
|
414
SharedLibraryCore/Migrations/DatabaseContextModelSnapshot.cs
Normal file
414
SharedLibraryCore/Migrations/DatabaseContextModelSnapshot.cs
Normal file
@ -0,0 +1,414 @@
|
||||
// <auto-generated />
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Objects;
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
partial class DatabaseContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.0.2-rtm-10011");
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientKill", b =>
|
||||
{
|
||||
b.Property<long>("KillId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("AttackerId");
|
||||
|
||||
b.Property<int>("Damage");
|
||||
|
||||
b.Property<int?>("DeathOriginVector3Id");
|
||||
|
||||
b.Property<int>("DeathType");
|
||||
|
||||
b.Property<int>("HitLoc");
|
||||
|
||||
b.Property<int?>("KillOriginVector3Id");
|
||||
|
||||
b.Property<int>("Map");
|
||||
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<int>("VictimId");
|
||||
|
||||
b.Property<int?>("ViewAnglesVector3Id");
|
||||
|
||||
b.Property<int>("Weapon");
|
||||
|
||||
b.Property<DateTime>("When");
|
||||
|
||||
b.HasKey("KillId");
|
||||
|
||||
b.HasIndex("AttackerId");
|
||||
|
||||
b.HasIndex("DeathOriginVector3Id");
|
||||
|
||||
b.HasIndex("KillOriginVector3Id");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.HasIndex("VictimId");
|
||||
|
||||
b.HasIndex("ViewAnglesVector3Id");
|
||||
|
||||
b.ToTable("EFClientKill");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientMessage", b =>
|
||||
{
|
||||
b.Property<long>("MessageId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("ClientId");
|
||||
|
||||
b.Property<string>("Message");
|
||||
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<DateTime>("TimeSent");
|
||||
|
||||
b.HasKey("MessageId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.ToTable("EFClientMessage");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics", b =>
|
||||
{
|
||||
b.Property<int>("ClientId");
|
||||
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("Deaths");
|
||||
|
||||
b.Property<int>("Kills");
|
||||
|
||||
b.Property<double>("SPM");
|
||||
|
||||
b.Property<double>("Skill");
|
||||
|
||||
b.Property<int>("TimePlayed");
|
||||
|
||||
b.HasKey("ClientId", "ServerId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.ToTable("EFClientStatistics");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFHitLocationCount", b =>
|
||||
{
|
||||
b.Property<int>("HitLocationCountId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int?>("EFClientStatisticsClientId");
|
||||
|
||||
b.Property<int?>("EFClientStatisticsServerId");
|
||||
|
||||
b.Property<int>("HitCount");
|
||||
|
||||
b.Property<float>("HitOffsetAverage");
|
||||
|
||||
b.Property<int>("Location");
|
||||
|
||||
b.HasKey("HitLocationCountId");
|
||||
|
||||
b.HasIndex("EFClientStatisticsClientId", "EFClientStatisticsServerId");
|
||||
|
||||
b.ToTable("EFHitLocationCount");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServer", b =>
|
||||
{
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("Port");
|
||||
|
||||
b.HasKey("ServerId");
|
||||
|
||||
b.ToTable("EFServer");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServerStatistics", b =>
|
||||
{
|
||||
b.Property<int>("StatisticId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<long>("TotalKills");
|
||||
|
||||
b.Property<long>("TotalPlayTime");
|
||||
|
||||
b.HasKey("StatisticId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.ToTable("EFServerStatistics");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAlias", b =>
|
||||
{
|
||||
b.Property<int>("AliasId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<DateTime>("DateAdded");
|
||||
|
||||
b.Property<int>("IPAddress");
|
||||
|
||||
b.Property<int>("LinkId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("AliasId");
|
||||
|
||||
b.HasIndex("LinkId");
|
||||
|
||||
b.ToTable("Aliases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAliasLink", b =>
|
||||
{
|
||||
b.Property<int>("AliasLinkId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.HasKey("AliasLinkId");
|
||||
|
||||
b.ToTable("AliasLinks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFClient", b =>
|
||||
{
|
||||
b.Property<int>("ClientId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("AliasLinkId");
|
||||
|
||||
b.Property<int>("Connections");
|
||||
|
||||
b.Property<int>("CurrentAliasId");
|
||||
|
||||
b.Property<DateTime>("FirstConnection");
|
||||
|
||||
b.Property<DateTime>("LastConnection");
|
||||
|
||||
b.Property<int>("Level");
|
||||
|
||||
b.Property<bool>("Masked");
|
||||
|
||||
b.Property<long>("NetworkId");
|
||||
|
||||
b.Property<string>("Password");
|
||||
|
||||
b.Property<string>("PasswordSalt");
|
||||
|
||||
b.Property<int>("TotalConnectionTime");
|
||||
|
||||
b.HasKey("ClientId");
|
||||
|
||||
b.HasIndex("AliasLinkId");
|
||||
|
||||
b.HasIndex("CurrentAliasId");
|
||||
|
||||
b.HasIndex("NetworkId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFPenalty", b =>
|
||||
{
|
||||
b.Property<int>("PenaltyId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<DateTime>("Expires");
|
||||
|
||||
b.Property<int>("LinkId");
|
||||
|
||||
b.Property<int>("OffenderId");
|
||||
|
||||
b.Property<string>("Offense")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("PunisherId");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.Property<DateTime>("When");
|
||||
|
||||
b.HasKey("PenaltyId");
|
||||
|
||||
b.HasIndex("LinkId");
|
||||
|
||||
b.HasIndex("OffenderId");
|
||||
|
||||
b.HasIndex("PunisherId");
|
||||
|
||||
b.ToTable("Penalties");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Helpers.Vector3", b =>
|
||||
{
|
||||
b.Property<int>("Vector3Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<float>("X");
|
||||
|
||||
b.Property<float>("Y");
|
||||
|
||||
b.Property<float>("Z");
|
||||
|
||||
b.HasKey("Vector3Id");
|
||||
|
||||
b.ToTable("Vector3");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientKill", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Attacker")
|
||||
.WithMany()
|
||||
.HasForeignKey("AttackerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "DeathOrigin")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeathOriginVector3Id");
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "KillOrigin")
|
||||
.WithMany()
|
||||
.HasForeignKey("KillOriginVector3Id");
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Victim")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "ViewAngles")
|
||||
.WithMany()
|
||||
.HasForeignKey("ViewAnglesVector3Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientMessage", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFHitLocationCount", b =>
|
||||
{
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics")
|
||||
.WithMany("HitLocations")
|
||||
.HasForeignKey("EFClientStatisticsClientId", "EFClientStatisticsServerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServerStatistics", b =>
|
||||
{
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAlias", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "Link")
|
||||
.WithMany("Children")
|
||||
.HasForeignKey("LinkId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFClient", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "AliasLink")
|
||||
.WithMany()
|
||||
.HasForeignKey("AliasLinkId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAlias", "CurrentAlias")
|
||||
.WithMany()
|
||||
.HasForeignKey("CurrentAliasId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFPenalty", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "Link")
|
||||
.WithMany("ReceivedPenalties")
|
||||
.HasForeignKey("LinkId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Offender")
|
||||
.WithMany("ReceivedPenalties")
|
||||
.HasForeignKey("OffenderId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Punisher")
|
||||
.WithMany("AdministeredPenalties")
|
||||
.HasForeignKey("PunisherId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@ -22,6 +22,7 @@ namespace SharedLibraryCore
|
||||
T4,
|
||||
T5,
|
||||
T5M,
|
||||
T6M,
|
||||
}
|
||||
|
||||
public Server(Interfaces.IManager mgr, ServerConfiguration config)
|
||||
|
@ -11,28 +11,6 @@
|
||||
<Company>Forever None</Company>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="LibSQLCe\x86\Microsoft.VC90.CRT\msvcr90.dll" />
|
||||
<None Remove="LibSQLCe\x86\Microsoft.VC90.CRT\README_ENU.txt" />
|
||||
<None Remove="LibSQLCe\x86\sqlceca40.dll" />
|
||||
<None Remove="LibSQLCe\x86\sqlcecompact40.dll" />
|
||||
<None Remove="LibSQLCe\x86\sqlceer40EN.dll" />
|
||||
<None Remove="LibSQLCe\x86\sqlceme40.dll" />
|
||||
<None Remove="LibSQLCe\x86\sqlceqp40.dll" />
|
||||
<None Remove="LibSQLCe\x86\sqlcese40.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="LibSQLCe\x86\Microsoft.VC90.CRT\msvcr90.dll" />
|
||||
<Content Include="LibSQLCe\x86\Microsoft.VC90.CRT\README_ENU.txt" />
|
||||
<Content Include="LibSQLCe\x86\sqlceca40.dll" />
|
||||
<Content Include="LibSQLCe\x86\sqlcecompact40.dll" />
|
||||
<Content Include="LibSQLCe\x86\sqlceer40EN.dll" />
|
||||
<Content Include="LibSQLCe\x86\sqlceme40.dll" />
|
||||
<Content Include="LibSQLCe\x86\sqlceqp40.dll" />
|
||||
<Content Include="LibSQLCe\x86\sqlcese40.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.0.2" />
|
||||
|
@ -294,6 +294,8 @@ namespace SharedLibraryCore
|
||||
return Game.T5M;
|
||||
if (gameName.Contains("IW5"))
|
||||
return Game.IW5;
|
||||
if (gameName.Contains("COD_T6_S"))
|
||||
return Game.T6M;
|
||||
|
||||
return Game.UKN;
|
||||
}
|
||||
|
@ -1,9 +0,0 @@
|
||||
set SolutionDir=%1
|
||||
set ProjectDir=%2
|
||||
set TargetDir=%3
|
||||
|
||||
if "TargetDir" == "*Undefined*" (
|
||||
echo "Copying extra files to publish dir"
|
||||
xcopy /Y "%SolutionDir%BUILD\Plugins" "%SolutionDir%Publish\Plugins\"
|
||||
xcopy /Y "%SolutionDir%SharedLibraryCore\LibSQLCe\x86" "%SolutionDir%Publish\x86\"
|
||||
)
|
@ -16,7 +16,11 @@ namespace WebfrontCore
|
||||
|
||||
public static IWebHost BuildWebHost() =>
|
||||
new WebHostBuilder()
|
||||
#if DEBUG
|
||||
.UseContentRoot(Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), @"..\..\..\..\", "WebfrontCore")))
|
||||
#else
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
#endif
|
||||
.UseKestrel()
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
|
@ -14,14 +14,6 @@
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"WebfrontCore2": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "http://localhost:61370/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
|
||||
<TypeScriptToolsVersion>2.6</TypeScriptToolsVersion>
|
||||
<PackageId>RaidMax.IW4MAdmin.WebfrontCore</PackageId>
|
||||
<Version>2.0.0</Version>
|
||||
@ -26,10 +25,6 @@
|
||||
<Content Remove="compilerconfig.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Properties\PublishProfiles\Publish - Stable - Portable - Any.pubxml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Views\Account\" />
|
||||
<Folder Include="wwwroot\" />
|
||||
@ -53,9 +48,6 @@
|
||||
<Content Update="appsettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="IW4MAdminSettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user