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

fixes for new polling setup

update database model for alias (nullable ip)
heartbeats now send ip to master server
This commit is contained in:
RaidMax
2018-11-25 20:00:36 -06:00
parent 1cfe7047a2
commit df5fbba22c
28 changed files with 1257 additions and 408 deletions

View File

@ -213,7 +213,7 @@ namespace SharedLibraryCore.Services
}
}
public async Task<List<EFPenalty>> GetActivePenaltiesAsync(int linkId, int ip = 0)
public async Task<List<EFPenalty>> GetActivePenaltiesAsync(int linkId, int? ip = null)
{
var now = DateTime.UtcNow;
@ -221,7 +221,7 @@ namespace SharedLibraryCore.Services
{
var iqPenalties = context.Penalties
.Where(p => p.LinkId == linkId ||
p.Link.Children.Any(a => a.IPAddress == ip))
ip.HasValue ? p.Link.Children.Any(a => a.IPAddress == ip) : false)
.Where(p => p.Type == Penalty.PenaltyType.TempBan ||
p.Type == Penalty.PenaltyType.Ban ||
p.Type == Penalty.PenaltyType.Flag)