diff --git a/Admin/Kayak.cs b/Admin/Kayak.cs index cf60b3c0..87e9a73c 100644 --- a/Admin/Kayak.cs +++ b/Admin/Kayak.cs @@ -53,6 +53,7 @@ namespace IW4MAdmin try { + request.Path = String.IsNullOrEmpty(request.Path) ? "/" : request.Path; SharedLibrary.HttpResponse requestedPage = WebService.GetPage(request.Path, querySet, request.Headers); bool binaryContent = requestedPage.BinaryContent != null; @@ -87,7 +88,6 @@ namespace IW4MAdmin ApplicationManager.GetInstance().Logger.WriteWarning("Request parameter data format was incorrect"); ApplicationManager.GetInstance().Logger.WriteDebug($"Request Path {request.Path}"); ApplicationManager.GetInstance().Logger.WriteDebug($"Request Query String {request.QueryString}"); - response.OnResponse(new HttpResponseHead() { Status = "400 Bad Request", diff --git a/Admin/Manager.cs b/Admin/Manager.cs index a0dc619f..2dcc2819 100644 --- a/Admin/Manager.cs +++ b/Admin/Manager.cs @@ -179,6 +179,7 @@ namespace IW4MAdmin Commands.Add(new CFindAllPlayers()); Commands.Add(new CPlugins()); Commands.Add(new CIP()); + Commands.Add(new CMask()); foreach (Command C in SharedLibrary.Plugins.PluginImporter.ActiveCommands) Commands.Add(C); diff --git a/Admin/WebService.cs b/Admin/WebService.cs index a8160c69..04653647 100644 --- a/Admin/WebService.cs +++ b/Admin/WebService.cs @@ -776,7 +776,13 @@ namespace IW4MAdmin else if (querySet["recent"] != null) { - matchedPlayers = ApplicationManager.GetInstance().GetClientDatabase().GetRecentPlayers(); + int offset = 0; + if (querySet["offset"] != null) + offset = Int32.Parse(querySet["offset"]); + if (offset < 0) + throw new FormatException("Invalid offset"); + + matchedPlayers = ApplicationManager.GetInstance().GetClientDatabase().GetRecentPlayers(15, offset); recent = true; } diff --git a/Admin/lib/SharedLibrary.dll b/Admin/lib/SharedLibrary.dll index c5e9a3db..336d26de 100644 Binary files a/Admin/lib/SharedLibrary.dll and b/Admin/lib/SharedLibrary.dll differ diff --git a/Admin/version.txt b/Admin/version.txt index 2dd3dcfb..112e2ed1 100644 --- a/Admin/version.txt +++ b/Admin/version.txt @@ -6,6 +6,8 @@ CHANGELOG: -If multiple matches are found when finding a player, a list of matches is shown -"special" characters are allowed in names and messages -prune command demotes inactive admins (defaults to 30 days if no days are specified) +-confirmation message sent after kick +-paginated players page Version 1.5 CHANGELOG: diff --git a/Admin/webfront/players.html b/Admin/webfront/players.html index 461cf0ab..ebf8f1dd 100644 --- a/Admin/webfront/players.html +++ b/Admin/webfront/players.html @@ -65,13 +65,24 @@ }).done(function (data) { $(".loader").fadeOut(); }); } + function getRecentPlayers(offset) { + $("#playersTable").html(""); + $(".loader").fadeIn(); + + $.getJSON("/getplayer?recent=1&offset=" + offset, function (result) { + $.each(result, function (i, player) { + printPlayer(player, i); + }); + }).done(function (data) { $(".loader").fadeOut(); }); + } + $(document).ready(function () { if (parseGet('id') != "undefined") getPlayer('id', parseGet('id')); else if (parseGet('name') != "undefined") getPlayer('name', parseGet('name')); else { - getPlayer('recent', '1'); + getRecentPlayers(0); } }); @@ -99,6 +110,11 @@