After getting banned, you now have to re-read the rules! (#33270)

* first commit

* opps

* Reset cooldown instead

* Added ccvar

* Not replicated!
This commit is contained in:
beck-thompson
2025-01-30 04:09:31 -08:00
committed by GitHub
parent cd46a39358
commit bc1d6420af
5 changed files with 13 additions and 5 deletions

View File

@@ -165,6 +165,8 @@ public sealed partial class BanManager : IBanManager, IPostInjectInit
null);
await _db.AddServerBanAsync(banDef);
if (_cfg.GetCVar(CCVars.ServerBanResetLastReadRules) && target != null)
await _db.SetLastReadRules(target.Value, null); // Reset their last read rules. They probably need a refresher!
var adminName = banningAdmin == null
? Loc.GetString("system-user")
: (await _db.GetPlayerRecordByUserId(banningAdmin.Value))?.LastSeenUserName ?? Loc.GetString("system-user");