update 'uptime' output

use translations for certain webfront page meta that was neglected
update plutonium parsers to not use new line in notices as it is not supported
This commit is contained in:
RaidMax 2021-01-08 19:21:23 -06:00
parent 5cb2d05f33
commit 843c01061d
9 changed files with 15 additions and 14 deletions

View File

@ -3,7 +3,7 @@ var eventParser;
var plugin = {
author: 'RaidMax',
version: 0.5,
version: 0.6,
name: 'Plutonium IW5 Parser',
isParser: true,
@ -26,6 +26,7 @@ var plugin = {
rconParser.Configuration.Dvar.AddMapping(107, 2);
rconParser.Configuration.WaitForResponse = true;
rconParser.Configuration.CanGenerateLogPath = true;
rconParser.Configuration.NoticeLineSeparator = '. ';
rconParser.Configuration.StatusHeader.Pattern = 'num +score +bot +ping +guid +name +lastmsg +address +qport +rate *';
rconParser.Configuration.Status.Pattern = '^ *([0-9]+) +-?([0-9]+) +(?:[0-1]{1}) +([0-9]{1,4}|[A-Z]{4}) +([a-f|A-F|0-9]{16}) +(.+?) +(?:[0-9]+) +(\\d+\\.\\d+\\.\\d+\\.\\d+\\:-?\\d{1,5}|0+\\.0+:-?\\d{1,5}|loopback) +(?:-?[0-9]+) +(?:[0-9]+) *$';

View File

@ -3,7 +3,7 @@ var eventParser;
var plugin = {
author: 'RaidMax, Xerxes',
version: 0.8,
version: 0.9,
name: 'Plutonium T6 Parser',
isParser: true,
@ -26,6 +26,7 @@ var plugin = {
rconParser.Configuration.Dvar.AddMapping(106, 1);
rconParser.Configuration.Dvar.AddMapping(107, 2);
rconParser.Configuration.WaitForResponse = false;
rconParser.Configuration.NoticeLineSeparator = '. ';
rconParser.Configuration.StatusHeader.Pattern = 'num +score +bot +ping +guid +name +lastmsg +address +qport +rate *';
rconParser.Configuration.Status.Pattern = '^ *([0-9]+) +([0-9]+) +(?:[0-1]{1}) +([0-9]+) +([A-F0-9]+|0) +(.+?) +(?:[0-9]+) +(\\d+\\.\\d+\\.\\d+\\.\\d+\\:-?\\d{1,5}|0+\\.0+:-?\\d{1,5}|loopback) +(?:-?[0-9]+) +(?:[0-9]+) *$';

View File

@ -830,9 +830,9 @@ namespace SharedLibraryCore.Commands
public override Task ExecuteAsync(GameEvent E)
{
TimeSpan uptime = DateTime.Now - System.Diagnostics.Process.GetCurrentProcess().StartTime;
var uptime = DateTime.Now - System.Diagnostics.Process.GetCurrentProcess().StartTime;
var loc = _translationLookup;
E.Origin.Tell(loc["COMMANDS_UPTIME_TEXT"].FormatExt(uptime.Days, uptime.Hours, uptime.Minutes));
E.Origin.Tell(loc["COMMANDS_UPTIME_TEXT"].FormatExt(uptime.HumanizeForCurrentCulture(4)));
return Task.CompletedTask;
}
}

View File

@ -129,7 +129,7 @@ namespace SharedLibraryCore.Configuration
TimeSpan.FromDays(1),
TimeSpan.FromDays(2),
TimeSpan.FromDays(7),
TimeSpan.FromDays(31)
TimeSpan.FromDays(30)
};
[LocalizedDisplayName("WEBFRONT_CONFIGURATION_PRESET_BAN_REASONS")]

View File

@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SharedLibraryCore;
using SharedLibraryCore.Interfaces;

View File

@ -131,8 +131,8 @@ namespace WebfrontCore.Controllers
}
ViewBag.Title = Localization["WEBFRONT_CLIENT_PRIVILEGED_TITLE"];
ViewBag.Description = "List of all privileged clients on IW4MAdmin";
ViewBag.Keywords = "IW4MAdmin, privileged, admins, clients, administrators";
ViewBag.Description = Localization["WEBFRONT_DESCRIPTION_PRIVILEGED"];
ViewBag.Keywords = Localization["WEBFRONT_KEYWORDS_PRIVILEGED"];
return View("Privileged/Index", adminsDict);
}

View File

@ -26,9 +26,9 @@ namespace WebfrontCore.Controllers
ID = s.EndPoint,
});
ViewBag.Description = "Use the IW4MAdmin web console to execute commands";
ViewBag.Description = Localization["WEFBRONT_DESCRIPTION_CONSOLE"];
ViewBag.Title = Localization["WEBFRONT_CONSOLE_TITLE"];
ViewBag.Keywords = "IW4MAdmin, console, execute, commands";
ViewBag.Keywords = Localization["WEBFRONT_KEYWORDS_CONSOLE"];
return View(activeServers);
}

View File

@ -24,9 +24,9 @@ namespace WebfrontCore.Controllers
public async Task<IActionResult> Index(Game? game = null)
{
ViewBag.Description = "IW4MAdmin is a complete server administration tool for IW4x.";
ViewBag.Description = Localization["WEBFRONT_DESCRIPTION_HOME"];
ViewBag.Title = Localization["WEBFRONT_HOME_TITLE"];
ViewBag.Keywords = "IW4MAdmin, server, administration, IW4x, MW2, Modern Warfare 2";
ViewBag.Keywords = Localization["WEBFRONT_KEWORDS_HOME"];
var servers = Manager.GetServers().Where(_server => !game.HasValue ? true : _server.GameName == game);

View File

@ -22,9 +22,9 @@ namespace WebfrontCore.Controllers
public IActionResult List(PenaltyType showOnly = PenaltyType.Any, bool hideAutomatedPenalties = true)
{
ViewBag.Description = "List of all the recent penalties (bans, kicks, warnings) on IW4MAdmin";
ViewBag.Description = Localization["WEBFRONT_DESCRIPTION_PENALTIES"];
ViewBag.Title = Localization["WEBFRONT_PENALTY_TITLE"];
ViewBag.Keywords = "IW4MAdmin, penalties, ban, kick, warns";
ViewBag.Keywords = Localization["WEBFRONT_KEYWORDS_PENALTIES"];
ViewBag.HideAutomatedPenalties = hideAutomatedPenalties;
return View(showOnly);