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:
@ -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,
|
||||
|
@ -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())
|
||||
|
Reference in New Issue
Block a user