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

added 'none' and extra m16 variants to weapon list

moved killstreak/deathstreak messages into configuration file
cleaned up configuration manager
fixed misc startup issue and threading
added more importing stuff
network id is a ulong now
ip str is now ip
added time played (per server)
This commit is contained in:
RaidMax
2018-02-10 22:33:42 -06:00
parent d1cdb93cc3
commit b8a161161d
33 changed files with 418 additions and 213 deletions

View File

@ -232,7 +232,7 @@ namespace IW4MAdmin
bool authed = querySet["IP"] == "127.0.0.1"
|| (await (ApplicationManager.GetInstance().GetClientService() as ClientService).GetPrivilegedClients())
.Where(x => x.IPAddress == querySet["IP"])
.Where(x => x.IPAddress == querySet["IP"].ConvertToIP())
.Where(x => x.Level > Player.Permission.Trusted).Count() > 0;
@ -384,7 +384,7 @@ namespace IW4MAdmin
if (S != null)
{
// fixme
Func<EFClient, bool> predicate = c => c.IPAddress == querySet["IP"];
Func<EFClient, bool> predicate = c => c.IPAddress == querySet["IP"].ConvertToIP();
Player admin = (await ApplicationManager.GetInstance().GetClientService().Find(predicate)).FirstOrDefault()?.AsPlayer();
if (admin == null)
@ -752,7 +752,7 @@ namespace IW4MAdmin
contentType = GetContentType(),
additionalHeaders = new Dictionary<string, string>()
};
Func<EFClient, bool> predicate = c => c.IPAddress == querySet["IP"] && c.Level > Player.Permission.Trusted;
Func<EFClient, bool> predicate = c => c.IPAddress == querySet["IP"].ConvertToIP() && c.Level > Player.Permission.Trusted;
bool authed = (await ApplicationManager.GetInstance().GetClientService().Find(predicate)).Count > 0
|| querySet["IP"] == "127.0.0.1";
bool recent = false;
@ -765,7 +765,7 @@ namespace IW4MAdmin
else if (querySet["npID"] != null)
{
matchedPlayers.Add(await ApplicationManager.GetInstance().GetClientService().GetUnique(querySet["npID"]));
matchedPlayers.Add(await ApplicationManager.GetInstance().GetClientService().GetUnique(querySet["npID"].ConvertLong()));
}
else if (querySet["name"] != null)
@ -793,11 +793,11 @@ namespace IW4MAdmin
PlayerInfo eachPlayer = new PlayerInfo()
{
playerIP = pp.IPAddress,
playerIP = pp.IPAddressString,
playerID = pp.ClientId,
playerLevel = pp.Level.ToString(),
playerName = pp.Name,
playernpID = pp.NetworkId,
playernpID = pp.NetworkId.ToString(),
forumID = -1,
authed = authed,
showV2Features = false,
@ -815,7 +815,7 @@ namespace IW4MAdmin
if (authed)
eachPlayer.playerIPs = pp.AliasLink.Children
.Select(a => a.IPAddress)
.Select(a => a.IPAddress.ConvertIPtoString())
.Distinct()
.ToList();
}