top stats info is per server instead of total when selecting each tab

fix issue with ingame name failing to match when using color codes
only show live radar for servers that support it
This commit is contained in:
RaidMax
2019-08-10 09:08:26 -05:00
parent a0266c5e69
commit 85d88815f1
6 changed files with 47 additions and 11 deletions

View File

@ -96,7 +96,7 @@ namespace SharedLibraryCore.Commands
{
E.Target = matchingPlayers.First();
string escapedName = Regex.Escape(E.Target.Name);
string escapedName = Regex.Escape(E.Target.CleanedName);
var reg = new Regex($"(\"{escapedName}\")|({escapedName})", RegexOptions.IgnoreCase);
E.Data = reg.Replace(E.Data, "", 1).Trim();
@ -126,12 +126,12 @@ namespace SharedLibraryCore.Commands
{
E.Target = matchingPlayers.First();
string escapedName = Regex.Escape(E.Target.Name);
string escapedName = Regex.Escape(E.Target.CleanedName);
string escapedArg = Regex.Escape(Args[0]);
var reg = new Regex($"({escapedName})|({escapedArg})", RegexOptions.IgnoreCase);
E.Data = reg.Replace(E.Data, "", 1).Trim();
if ((E.Data.Trim() == E.Target.Name.ToLower().Trim() ||
if ((E.Data.Trim() == E.Target.CleanedName.ToLower().Trim() ||
E.Data == String.Empty) &&
C.RequiresTarget)
{