remove reports on ban/tempban
This commit is contained in:
parent
e07651b931
commit
71abaac9e1
@ -1472,6 +1472,11 @@ namespace IW4MAdmin
|
||||
|
||||
ServerLogger.LogDebug("Creating tempban penalty for {TargetClient}", targetClient.ToString());
|
||||
await newPenalty.TryCreatePenalty(Manager.GetPenaltyService(), ServerLogger);
|
||||
|
||||
foreach (var reports in Manager.GetServers().Select(server => server.Reports))
|
||||
{
|
||||
reports.RemoveAll(report => report.Target.ClientId == targetClient.ClientId);
|
||||
}
|
||||
|
||||
if (activeClient.IsIngame)
|
||||
{
|
||||
@ -1502,6 +1507,11 @@ namespace IW4MAdmin
|
||||
activeClient.SetLevel(Permission.Banned, originClient);
|
||||
await newPenalty.TryCreatePenalty(Manager.GetPenaltyService(), ServerLogger);
|
||||
|
||||
foreach (var reports in Manager.GetServers().Select(server => server.Reports))
|
||||
{
|
||||
reports.RemoveAll(report => report.Target.ClientId == targetClient.ClientId);
|
||||
}
|
||||
|
||||
if (activeClient.IsIngame)
|
||||
{
|
||||
ServerLogger.LogDebug("Attempting to kicking newly banned client {ActiveClient}", activeClient.ToString());
|
||||
|
Loading…
Reference in New Issue
Block a user