1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-25 22:50:27 -05:00

fixes to get closer to a release

This commit is contained in:
RaidMax
2018-02-15 22:01:28 -06:00
parent 7a15980a0c
commit 89cfb80798
23 changed files with 287 additions and 181 deletions

View File

@ -57,7 +57,7 @@ namespace SharedLibrary.Services
// set the level to the level of the existing client if they have the same IP + Name but new NetworkId
Level = hasExistingAlias ?
context.Clients.First(c => c.CurrentAliasId == existingAlias.AliasId).Level :
Objects.Player.Permission.User,
Player.Permission.User,
FirstConnection = DateTime.UtcNow,
Connections = 1,
LastConnection = DateTime.UtcNow,

View File

@ -192,6 +192,20 @@ namespace SharedLibrary.Services
}
}
public async Task<List<EFPenalty>> GetActivePenaltiesAsync(int aliasId)
{
using (var context = new DatabaseContext())
{
var iqPenalties = from link in context.AliasLinks
where link.AliasLinkId == aliasId
join penalty in context.Penalties
on link.AliasLinkId equals penalty.LinkId
where penalty.Active
select penalty;
return await iqPenalties.ToListAsync();
}
}
public async Task RemoveActivePenalties(int aliasLinkId)
{
using (var context = new DatabaseContext())