Implement BlacklistedRange exempt flag (#29258)

* Implement a new kind of ip range ban that only applies to new players

* Put determining whether a player record exists to its own function

* Make BlacklistedRange bans get bypassed by any ban exemption

* Stop trying to get another DbGuard while already having one

This does break with convention on the functions in that area but
considering the use of this function it's probably fine?
I could alternatively just move the place it's called from.

Also I was suppossed to wait for tests to finish locally just to be
sure, but nah. I am pushing this now
This commit is contained in:
nikthechampiongr
2024-06-21 12:06:07 +00:00
committed by GitHub
parent 6b13f5f0cb
commit 76a65c8e43
4 changed files with 41 additions and 8 deletions

View File

@@ -693,6 +693,14 @@ namespace Content.Server.Database
/// Intended use is for users with shared connections. This should not be used as an alternative to <see cref="Datacenter"/>.
/// </remarks>
IP = 1 << 1,
/// <summary>
/// Ban is an IP range that is only applied for first time joins.
/// </summary>
/// <remarks>
/// Intended for use with residential IP ranges that are often used maliciously.
/// </remarks>
BlacklistedRange = 1 << 2,
// @formatter:on
}