Skip to content

Commit

Permalink
Patch for mutable data not being correctly updated (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbah committed Nov 24, 2023
1 parent af6713c commit e86f3e7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions CentCom.Server/BanSources/BanParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,20 @@ private async Task<CheckHistory> ParseBans(IJobExecutionContext context)
{
var changed = false;

// Check for a difference in date time, unbans, or reason
if (matchedBan.Reason != b.Reason || matchedBan.BannedOn != b.BannedOn || matchedBan.Expires != b.Expires ||
matchedBan.UnbannedBy != b.UnbannedBy)
// Check for changes in mutable data
if (matchedBan.Reason != b.Reason
|| matchedBan.BannedOn != b.BannedOn
|| matchedBan.Expires != b.Expires
|| matchedBan.UnbannedBy != b.UnbannedBy
|| matchedBan.BannedBy != b.BannedBy
|| matchedBan.CKey != b.CKey)
{
matchedBan.Reason = b.Reason;
matchedBan.BannedOn = b.BannedOn;
matchedBan.Expires = b.Expires;
matchedBan.UnbannedBy = b.UnbannedBy;
matchedBan.BannedBy = b.BannedBy;
matchedBan.CKey = b.CKey;
changed = true;
}

Expand Down

0 comments on commit e86f3e7

Please sign in to comment.