1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

fixed aliases

fixed forum decoding of thread content
fixed escaping html "special" characters in player names on webfront
fixed findall not always informing if no matches found.
This commit is contained in:
RaidMax
2017-11-19 00:44:11 -06:00
parent 9a85b9c4c2
commit 2aa3aa5baf
9 changed files with 80 additions and 59 deletions

View File

@ -758,8 +758,9 @@ namespace IW4MAdmin
bool authed = ApplicationManager.GetInstance().GetClientDatabase().GetAdmins().FindAll(x => x.IP == querySet["IP"] && x.Level > Player.Permission.Trusted).Count > 0
|| querySet["IP"] == "127.0.0.1";
bool recent = false;
bool individual = querySet["id"] != null;
if (querySet["id"] != null)
if (individual)
{
matchedPlayers.Add(ApplicationManager.GetInstance().GetClientDatabase().GetPlayer(Convert.ToInt32(querySet["id"])));
}
@ -801,18 +802,24 @@ namespace IW4MAdmin
playernpID = pp.NetworkID,
forumID = -1,
authed = authed,
showV2Features = false
showV2Features = false,
playerAliases = new List<string>(),
playerIPs = new List<string>()
};
if (!recent)
if (!recent && individual)
{
foreach (var a in ApplicationManager.GetInstance().GetAliases(pp))
{
eachPlayer.playerAliases = a.Names;
eachPlayer.playerIPs = a.IPS;
eachPlayer.playerAliases.AddRange(a.Names);
eachPlayer.playerIPs.AddRange(a.IPS);
}
}
eachPlayer.playerAliases = eachPlayer.playerAliases.Distinct().ToList();
eachPlayer.playerIPs = eachPlayer.playerIPs.Distinct().ToList();
eachPlayer.playerConnections = pp.Connections;
eachPlayer.lastSeen = Utilities.GetTimePassed(pp.LastConnection);
pInfo.Add(eachPlayer);