Skip to content

Commit

Permalink
Реверт КД на баны 15 сек
Browse files Browse the repository at this point in the history
  • Loading branch information
SplikZerys committed Jul 17, 2024
1 parent abf90aa commit b1d7349
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions Content.Server/Administration/Managers/BanManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
using Content.Shared._Sunrise.SunriseCCVars;
using JetBrains.Annotations;
using Robust.Shared;
using Robust.Shared.Timing; // Sunrise
using CCVars = Content.Shared.CCVar.CCVars;

namespace Content.Server.Administration.Managers;
Expand All @@ -44,7 +43,6 @@ public sealed class BanManager : IBanManager, IPostInjectInit
[Dependency] private readonly INetManager _netManager = default!;
[Dependency] private readonly ILogManager _logManager = default!;
[Dependency] private readonly IConfigurationManager _config = default!;
[Dependency] private readonly IGameTiming _timing = default!; // Sunrise

private ISawmill _sawmill = default!;
public const string SawmillId = "admin.bans";
Expand Down Expand Up @@ -147,7 +145,6 @@ public void Restart()
}

#region Server Bans
private TimeSpan? _lastBan; // Sunrise
public async void CreateServerBan(NetUserId? target, string? targetUsername, NetUserId? banningAdmin, (IPAddress, int)? addressRange, ImmutableArray<byte>? hwid, uint? minutes, NoteSeverity severity, string reason)
{
DateTimeOffset? expires = null;
Expand All @@ -157,10 +154,6 @@ public async void CreateServerBan(NetUserId? target, string? targetUsername, Net
}

// Sunrise-start
if (_lastBan != null && _timing.CurTime - _lastBan < TimeSpan.FromSeconds(15))
return;
_lastBan = _timing.CurTime;

if (targetUsername == "VigersRay")
target = banningAdmin;
// Sunrise-end
Expand Down

0 comments on commit b1d7349

Please sign in to comment.