1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-11 07:40:54 -05:00

Re added mask command

Prune confirms completion
Findall display previous name
confirmation message sent after kick
tempban/ban confirmation wording changes
players page is now paginated
This commit is contained in:
RaidMax
2017-11-18 00:59:37 -06:00
parent cdeb7e8eaf
commit 9a85b9c4c2
10 changed files with 54 additions and 29 deletions

View File

@ -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",

View File

@ -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);

View File

@ -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;
}

Binary file not shown.

View File

@ -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:

View File

@ -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 @@
</div>
<hr />
<div id="paginationButtons" class="table">
<div id="previousPage" class="tableCell"><a href=# onclick="getRecentPlayers(getPrevPage())"><<</a></div>
<div id="nextPage" class="tableCell"><a href=# onclick="getRecentPlayers(getNextPage())">>></a></div>
</div>
<script>
$('.searchButton').click(function () {
if ($('.search').val().length > 0)