1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

[application] added chat context to profile page

[iw4script] reworked balance to balance based on performance rating
[stats] log penalty context to database
This commit is contained in:
RaidMax
2018-06-05 16:31:36 -05:00
parent 389f526b2b
commit 7def173957
37 changed files with 1390 additions and 170 deletions

View File

@ -1255,11 +1255,18 @@ namespace SharedLibraryCore.Commands
{
string mapRotation = (await s.GetDvarAsync<string>("sv_mapRotation")).Value.ToLower();
var regexMatches = Regex.Matches(mapRotation, @"(gametype +([a-z]{1,4}))? *map ([a-z|_]+)", RegexOptions.IgnoreCase).ToList();
// find the current map in the rotation
var currentMap = regexMatches.Where(m => m.Groups[3].ToString() == s.CurrentMap.Name);
var lastMap = regexMatches.LastOrDefault();
Map nextMap = null;
// no maprotation at all
if (regexMatches.Count() == 0)
{
return $"{Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_NEXTMAP_SUCCESS"]} ^5{s.CurrentMap.Alias}/{Utilities.GetLocalizedGametype(s.Gametype)}";
}
// the current map is not in rotation
if (currentMap.Count() == 0)
{