diff --git a/Admin/Application.csproj b/Admin/Application.csproj index fd6715330..17914b731 100644 --- a/Admin/Application.csproj +++ b/Admin/Application.csproj @@ -159,6 +159,39 @@ MinimumRecommendedRules.ruleset true + + bin\Release\ + TRACE + true + true + 3 + pdbonly + x86 + On + prompt + false + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + true + x86 + MinimumRecommendedRules.ruleset + + + bin\x64\Release\ + TRACE + true + true + 3 + pdbonly + x64 + On + prompt + false + MinimumRecommendedRules.ruleset + true + diff --git a/Admin/lib b/Admin/lib new file mode 100644 index 000000000..fc38b3684 Binary files /dev/null and b/Admin/lib differ diff --git a/IW4MAdmin.sln b/IW4MAdmin.sln index d8666ad47..28fe4406c 100644 --- a/IW4MAdmin.sln +++ b/IW4MAdmin.sln @@ -80,8 +80,8 @@ Global {DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release|Mixed Platforms.Build.0 = Release-Stable|x86 {DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release|x64.ActiveCfg = Release-Nightly|x64 {DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release|x64.Build.0 = Release-Nightly|x64 - {DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release|x86.ActiveCfg = Debug|x86 - {DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release|x86.Build.0 = Debug|x86 + {DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release|x86.ActiveCfg = Release|x86 + {DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release|x86.Build.0 = Release|x86 {DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU {DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Nightly|Any CPU.Build.0 = Release-Nightly|Any CPU {DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Nightly|x86 @@ -112,8 +112,8 @@ Global {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|Mixed Platforms.Build.0 = Release-Stable|x86 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|x64.ActiveCfg = Release-Nightly|x64 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|x64.Build.0 = Release-Nightly|x64 - {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|x86.ActiveCfg = Debug|x86 - {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|x86.Build.0 = Debug|x86 + {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|x86.ActiveCfg = Release|x86 + {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release|x86.Build.0 = Release|x86 {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|Any CPU.Build.0 = Release-Nightly|Any CPU {4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Nightly|x86 @@ -144,8 +144,8 @@ Global {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|Mixed Platforms.Build.0 = Release-Stable|x86 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|x64.ActiveCfg = Release-Nightly|x64 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|x64.Build.0 = Release-Nightly|x64 - {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|x86.ActiveCfg = Debug|x86 - {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|x86.Build.0 = Debug|x86 + {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|x86.ActiveCfg = Release|x86 + {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release|x86.Build.0 = Release|x86 {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Nightly|Any CPU.Build.0 = Release-Nightly|Any CPU {D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Nightly|x86 @@ -176,8 +176,8 @@ Global {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|Mixed Platforms.Build.0 = Release-Stable|x86 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|x64.ActiveCfg = Release-Nightly|x64 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|x64.Build.0 = Release-Nightly|x64 - {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|x86.ActiveCfg = Debug|x86 - {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|x86.Build.0 = Debug|x86 + {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|x86.ActiveCfg = Release|x86 + {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release|x86.Build.0 = Release|x86 {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|Any CPU.Build.0 = Release-Nightly|Any CPU {AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Nightly|x86 @@ -346,16 +346,16 @@ Global {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|x64.ActiveCfg = Debug|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|x64.Build.0 = Debug|Any CPU - {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|x86.ActiveCfg = Debug|Any CPU - {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|x86.Build.0 = Debug|Any CPU + {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|x86.ActiveCfg = Debug|x86 + {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Debug|x86.Build.0 = Debug|x86 {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|Any CPU.ActiveCfg = Release|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|Any CPU.Build.0 = Release|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|Mixed Platforms.Build.0 = Release|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|x64.ActiveCfg = Release|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|x64.Build.0 = Release|Any CPU - {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|x86.ActiveCfg = Release|Any CPU - {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|x86.Build.0 = Release|Any CPU + {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|x86.ActiveCfg = Release|x86 + {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release|x86.Build.0 = Release|x86 {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release-Nightly|Any CPU.ActiveCfg = Release|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release-Nightly|Any CPU.Build.0 = Release|Any CPU {65340D7D-5831-406C-ACAD-B13BA634BDE2}.Release-Nightly|Mixed Platforms.ActiveCfg = Release|Any CPU diff --git a/Plugins/SimpleStats/StatsPlugin.csproj b/Plugins/SimpleStats/StatsPlugin.csproj index 54a985466..d2448fd11 100644 --- a/Plugins/SimpleStats/StatsPlugin.csproj +++ b/Plugins/SimpleStats/StatsPlugin.csproj @@ -83,6 +83,30 @@ prompt MinimumRecommendedRules.ruleset + + bin\Release\ + TRACE + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + true + x86 + MinimumRecommendedRules.ruleset + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + diff --git a/Plugins/Welcome/WelcomePlugin.csproj b/Plugins/Welcome/WelcomePlugin.csproj index e382a0566..e88851754 100644 --- a/Plugins/Welcome/WelcomePlugin.csproj +++ b/Plugins/Welcome/WelcomePlugin.csproj @@ -83,6 +83,30 @@ prompt MinimumRecommendedRules.ruleset + + bin\Release\ + TRACE + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + true + x86 + MinimumRecommendedRules.ruleset + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + diff --git a/SharedLibrary/Commands/NativeCommands.cs b/SharedLibrary/Commands/NativeCommands.cs index 7161ae0eb..41ab7326a 100644 --- a/SharedLibrary/Commands/NativeCommands.cs +++ b/SharedLibrary/Commands/NativeCommands.cs @@ -169,7 +169,7 @@ namespace SharedLibrary.Commands public override async Task ExecuteAsync(Event E) { String Message = Utilities.RemoveWords(E.Data, 1).Trim(); - var length = E.Data.Split(' ')[0].ParseTimespan(); + var length = E.Data.Split(' ')[0].ToLower().ParseTimespan(); if (E.Origin.Level > E.Target.Level) { diff --git a/SharedLibrary/Dtos/ServerInfo.cs b/SharedLibrary/Dtos/ServerInfo.cs index d105706ea..ae42657a1 100644 --- a/SharedLibrary/Dtos/ServerInfo.cs +++ b/SharedLibrary/Dtos/ServerInfo.cs @@ -14,7 +14,7 @@ namespace SharedLibrary.Dtos public string GameType { get; set; } public int ClientCount { get; set; } public int MaxClients { get; set; } - public List ChatHistory { get; set; } + public Chat[] ChatHistory { get; set; } public List Players { get; set; } public Helpers.PlayerHistory[] PlayerHistory { get; set; } public int ID { get; set; } diff --git a/SharedLibrary/SharedLibrary.csproj b/SharedLibrary/SharedLibrary.csproj index 0c12cbbe6..caac09cfb 100644 --- a/SharedLibrary/SharedLibrary.csproj +++ b/SharedLibrary/SharedLibrary.csproj @@ -93,6 +93,30 @@ prompt MinimumRecommendedRules.ruleset + + bin\Release\ + TRACE + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + true + x86 + MinimumRecommendedRules.ruleset + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll diff --git a/WebfrontCore/Controllers/HomeController.cs b/WebfrontCore/Controllers/HomeController.cs index c1d7dfe70..b0d5d4416 100644 --- a/WebfrontCore/Controllers/HomeController.cs +++ b/WebfrontCore/Controllers/HomeController.cs @@ -12,6 +12,7 @@ namespace WebfrontCore.Controllers { public IActionResult Index() { + ViewBag.Title = "Server Overview"; return View(); } diff --git a/WebfrontCore/Controllers/ServerController.cs b/WebfrontCore/Controllers/ServerController.cs index 9503e7e69..d21674445 100644 --- a/WebfrontCore/Controllers/ServerController.cs +++ b/WebfrontCore/Controllers/ServerController.cs @@ -11,6 +11,7 @@ namespace WebfrontCore.Controllers { [HttpGet] + [ResponseCache(NoStore = true, Duration = 0)] public IActionResult ClientActivity(int id) { @@ -32,7 +33,7 @@ namespace WebfrontCore.Controllers Name = p.Name, ClientId = p.ClientId }).ToList(), - ChatHistory = s.ChatHistory, + ChatHistory = s.ChatHistory.OrderBy(c => c.Time).Take((int)Math.Ceiling(s.ClientNum / 2.0)).ToArray(), PlayerHistory = s.PlayerHistory.ToArray() }; return PartialView("_ClientActivity", serverInfo); diff --git a/WebfrontCore/Program.cs b/WebfrontCore/Program.cs index 59af9f63c..bb6cbbbc9 100644 --- a/WebfrontCore/Program.cs +++ b/WebfrontCore/Program.cs @@ -16,7 +16,11 @@ namespace WebfrontCore .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() .UseStartup() - .UseUrls("http://192.168.1.27:5000;http://server.nbsclan.org:8080") +#if !DEBUG + .UseUrls("http://server.nbsclan.org:8080") +#else + .UseUrls("http://192.168.88.254:5000") +#endif .Build(); host.Run(); diff --git a/WebfrontCore/Properties/PublishProfiles/FolderProfile1.pubxml b/WebfrontCore/Properties/PublishProfiles/FolderProfile1.pubxml new file mode 100644 index 000000000..416719679 --- /dev/null +++ b/WebfrontCore/Properties/PublishProfiles/FolderProfile1.pubxml @@ -0,0 +1,21 @@ + + + + + FileSystem + FileSystem + Debug + x86 + + True + False + 65340d7d-5831-406c-acad-b13ba634bde2 + bin\Debug\PublishOutput + True + net452 + win7-x86 + + \ No newline at end of file diff --git a/WebfrontCore/ViewComponents/ServerListViewComponent.cs b/WebfrontCore/ViewComponents/ServerListViewComponent.cs index 32a6dc3f1..65e8694ac 100644 --- a/WebfrontCore/ViewComponents/ServerListViewComponent.cs +++ b/WebfrontCore/ViewComponents/ServerListViewComponent.cs @@ -28,7 +28,7 @@ namespace WebfrontCore.ViewComponents Name = p.Name, ClientId = p.ClientId }).ToList(), - ChatHistory = s.ChatHistory + ChatHistory = s.ChatHistory.ToArray() }).ToList(); return View("_List", serverInfo); } diff --git a/WebfrontCore/Views/Client/Find/Index.cshtml b/WebfrontCore/Views/Client/Find/Index.cshtml index 38602e7b0..549fd27f8 100644 --- a/WebfrontCore/Views/Client/Find/Index.cshtml +++ b/WebfrontCore/Views/Client/Find/Index.cshtml @@ -1,7 +1,7 @@ @model List
-

@ViewBag.Title

+

@ViewBag.Title

Name
Level
diff --git a/WebfrontCore/Views/Client/Privileged/Index.cshtml b/WebfrontCore/Views/Client/Privileged/Index.cshtml index 234040969..14348652e 100644 --- a/WebfrontCore/Views/Client/Privileged/Index.cshtml +++ b/WebfrontCore/Views/Client/Privileged/Index.cshtml @@ -1,5 +1,5 @@ @model Dictionary> -

@ViewBag.Title

+

@ViewBag.Title

@{ @@ -12,7 +12,7 @@
@foreach (var client in Model[key]) { - @Html.ActionLink(client.Name, "profileasync", "client", new { id = client.ClientId }, new { @class = "text-light" })
+ @Html.ActionLink(client.Name, "profileasync", "client", new { id = client.ClientId }, new { @class = "" })
}
} diff --git a/WebfrontCore/Views/Client/Profile/Index.cshtml b/WebfrontCore/Views/Client/Profile/Index.cshtml index 893aeb23b..54ff7e517 100644 --- a/WebfrontCore/Views/Client/Profile/Index.cshtml +++ b/WebfrontCore/Views/Client/Profile/Index.cshtml @@ -1,14 +1,14 @@ @model SharedLibrary.Dtos.PlayerInfo -
+
@Model.Name[0].ToString().ToUpper()
-
+
- @Model.Name +

@Model.Name

@{ foreach (string alias in Model.Aliases) @@ -18,8 +18,8 @@ }
-
- @Model.Level +
+
@Model.Level
Played @Model.TimePlayed hours @@ -31,11 +31,11 @@ Last seen @Model.LastSeen ago
-
+
-
+
@{ if (Model.Meta.Count == 0) diff --git a/WebfrontCore/Views/Server/_ClientActivity.cshtml b/WebfrontCore/Views/Server/_ClientActivity.cshtml index 349cfa079..b7f4f2b42 100644 --- a/WebfrontCore/Views/Server/_ClientActivity.cshtml +++ b/WebfrontCore/Views/Server/_ClientActivity.cshtml @@ -6,14 +6,22 @@ }
@{ - for (int i = 0; i < half && i < Model.ChatHistory.Count; i++) + for (int i = 0; i < Model.ChatHistory.Length; i++) { string message = "– " + @Model.ChatHistory[i].Message; if (Model.ChatHistory[i].Message == "CONNECTED") - message = ""; - else if (Model.ChatHistory[i].Message == "DISCONNECTED") - message = ""; - @Html.ActionLink(Model.Players[i].Name, "ProfileAsync", "Client", new { id = Model.Players[i].ClientId }, new { @class = "text-muted" }) @Html.Raw(@message)
+ { + @Model.ChatHistory[i].Name
+ } + if (Model.ChatHistory[i].Message == "DISCONNECTED") + { + + @Model.ChatHistory[i].Name
+ } + if (Model.ChatHistory[i].Message != "CONNECTED" && Model.ChatHistory[i].Message != "DISCONNECTED") + { + @Model.ChatHistory[i].Name @Html.Raw(@message)
+ } } }
diff --git a/WebfrontCore/Views/Shared/_Layout.cshtml b/WebfrontCore/Views/Shared/_Layout.cshtml index 36870ab2c..ba72e3f1c 100644 --- a/WebfrontCore/Views/Shared/_Layout.cshtml +++ b/WebfrontCore/Views/Shared/_Layout.cshtml @@ -9,6 +9,10 @@ + + + +
@@ -24,7 +28,7 @@
- +
@@ -39,6 +43,11 @@ + + + + + @RenderSection("scripts", required: false) diff --git a/WebfrontCore/WebfrontCore.csproj b/WebfrontCore/WebfrontCore.csproj index da3612c7b..789efc3f5 100644 --- a/WebfrontCore/WebfrontCore.csproj +++ b/WebfrontCore/WebfrontCore.csproj @@ -6,6 +6,7 @@ WebfrontCore Exe WebfrontCore + AnyCPU;x86 diff --git a/WebfrontCore/wwwroot/css/profile.css b/WebfrontCore/wwwroot/css/profile.css index c6860b319..c468668b5 100644 --- a/WebfrontCore/wwwroot/css/profile.css +++ b/WebfrontCore/wwwroot/css/profile.css @@ -68,7 +68,7 @@ } .profile-meta-entry { - font-size: 1.5em; + } .penalties-color-kick, @@ -113,19 +113,17 @@ #profile_aliases { position: relative; display: none; - top: 0.2em; - font-size: 0.5em; - line-height: 1.2em; + } #profile_avatar { - height: 200px; - width: 200px; + height: 10.5rem; + width: 10.5rem; } .profile-shortcode { - font-size: 150pt; - line-height: 11rem; + font-size: 10.5rem; + line-height: 10.5rem; color: white; } @@ -142,9 +140,7 @@ #profile_level > span.level { color: rgba(236, 130, 222, 0.69); - font-weight: bold; - font-size: 1.5em; - line-height: 1.4em; + font-weight: bold; } #profile_wrapper { @@ -152,24 +148,9 @@ } #profile_name { - font-size: 4em; - margin-top: -2rem; + } #profile_info > .text-muted { - font-size: 1.5em; - line-height: 2.25rem; + } - -#profile_aliases_btn { - position: absolute; - top: auto; - margin-top: 2.25rem; - font-size: 0.5em; - color: rgb(0,122,204); -} - - #profile_aliases_btn:hover { - color: white; - cursor: pointer; - } diff --git a/WebfrontCore/wwwroot/favicon.ico b/WebfrontCore/wwwroot/favicon.ico index a3a799985..3edaf82e7 100644 Binary files a/WebfrontCore/wwwroot/favicon.ico and b/WebfrontCore/wwwroot/favicon.ico differ diff --git a/WebfrontCore/wwwroot/js/profile.js b/WebfrontCore/wwwroot/js/profile.js index 7304901a4..baa711958 100644 --- a/WebfrontCore/wwwroot/js/profile.js +++ b/WebfrontCore/wwwroot/js/profile.js @@ -3,7 +3,7 @@ Expand alias tab if they have any */ $('#profile_aliases_btn').click(function (e) { - const aliases = $('#profile_aliases').text(); + const aliases = $('#profile_aliases').text().trim(); if (aliases && aliases.length !== 0) { $('#profile_aliases').slideToggle(150); } @@ -69,6 +69,13 @@ $(document).ready(function () { } }); + $.each(clientInfo.Meta, function (index, meta) { + if (!meta.key.includes("Event")) { + let metaString = `
${meta.value} ${meta.key}
`; + $("#profile_meta").append(metaString); + } + }); + $.each(clientInfo.Meta, function (index, meta) { loadMeta(meta); diff --git a/WebfrontCore/wwwroot/js/server.js b/WebfrontCore/wwwroot/js/server.js index 6b6c58671..0ca171c81 100644 --- a/WebfrontCore/wwwroot/js/server.js +++ b/WebfrontCore/wwwroot/js/server.js @@ -71,7 +71,10 @@ function refreshClientActivity() { $('.server-history-row').each(function (index) { let serverId = $(this).data("serverid"); - $.get("/server/clientactivity/" + serverId) + $.get({ + url: "/server/clientactivity/" + serverId, + cache: false + }) .done(function (response) { $('#server_clientactivity_' + serverId).html(response); })