remove reports on ban/tempban
This commit is contained in:
parent
e07651b931
commit
71abaac9e1
@ -1473,6 +1473,11 @@ namespace IW4MAdmin
|
|||||||
ServerLogger.LogDebug("Creating tempban penalty for {TargetClient}", targetClient.ToString());
|
ServerLogger.LogDebug("Creating tempban penalty for {TargetClient}", targetClient.ToString());
|
||||||
await newPenalty.TryCreatePenalty(Manager.GetPenaltyService(), ServerLogger);
|
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)
|
if (activeClient.IsIngame)
|
||||||
{
|
{
|
||||||
var formattedKick = string.Format(RconParser.Configuration.CommandPrefixes.Kick,
|
var formattedKick = string.Format(RconParser.Configuration.CommandPrefixes.Kick,
|
||||||
@ -1502,6 +1507,11 @@ namespace IW4MAdmin
|
|||||||
activeClient.SetLevel(Permission.Banned, originClient);
|
activeClient.SetLevel(Permission.Banned, originClient);
|
||||||
await newPenalty.TryCreatePenalty(Manager.GetPenaltyService(), ServerLogger);
|
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)
|
if (activeClient.IsIngame)
|
||||||
{
|
{
|
||||||
ServerLogger.LogDebug("Attempting to kicking newly banned client {ActiveClient}", activeClient.ToString());
|
ServerLogger.LogDebug("Attempting to kicking newly banned client {ActiveClient}", activeClient.ToString());
|
||||||
|
Loading…
Reference in New Issue
Block a user