Automated whitelists (#23985)

* Beginnings of making the breadmemes jobs easier

* stuff

* stuff pt. 2

* Stuff pt.3

* Stuff I forgot last time

* Basic whitelist

Only people that are added to the whitelist with the addwhitelist command will be able to join. I call this the "legacy" whitelist

* Remove always deny condition in favor of just breaking if playtime check fails

* Change default whitelist

Default whitelist is now the "legacy" whitelist.

* localization

* Admin check

* minor spelling change

* Fix build

* Whitelist message

* Fix vars not being datafield and spelling mistakes

* Minor spelling mistake

* Change config for salamander

* Reviews and stuff

* Add summaries

* Fix whitelists

* Forgot to add a datafield

* Fixing stuff I guess

* Reuse admin remarks to reduce load when connecting.

* Update log messages to be verbose instead of debug

* Reviews

* whoops

* Explain a bit more how whitelist checking works

* Apply CE's review

* Append Membership to Blacklist and Whitelist conditions

* Fix review comments

* Uncapitalize playerConnectionWhitelist, add to ignored client prototypes

* Make note count field work

* Fix cvar for thingy

---------

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
Simon
2024-08-27 18:01:17 +02:00
committed by GitHub
parent e59b9c5714
commit f92ef41538
28 changed files with 4289 additions and 47 deletions

View File

@@ -0,0 +1,7 @@
- type: playerConnectionWhitelist
id: basicWhitelist # Basic whitelist using only the ManualWhitelist condition
conditions:
- !type:ConditionManualWhitelistMembership
action: Allow # Allow connection if matched
- !type:ConditionAlwaysMatch # Condition that always matches
action: Deny # Deny connection if matched

View File

@@ -0,0 +1,39 @@
# This is the whitelist used for Wizard's Den Salamander
- type: playerConnectionWhitelist
id: salamanderMrpWhitelist
conditions:
- !type:ConditionManualBlacklistMembership # Deny blacklisted (MRP ban)
action: Deny
- !type:ConditionNotesPlaytimeRange # Deny for high severity notes in the last 30 days
includeExpired: false
minimumSeverity: 3 # High
minimumNotes: 1
range: 30 # 30 days
action: Deny
includeSecret: false
- !type:ConditionNotesPlaytimeRange # Deny for >=2 medium severity notes in the last 14 days
includeExpired: false
minimumSeverity: 2 # Medium
minimumNotes: 1
range: 14 # 14 Days
action: Deny
includeSecret: false
- !type:ConditionNotesPlaytimeRange # Deny for >=3 low severity notes in the last 14 days
includeExpired: false
minimumSeverity: 1 # Low
minimumNotes: 3
range: 14 # 14 Days
action: Deny
includeSecret: false
- !type:ConditionManualWhitelistMembership # Allow whitelisted players
action: Allow
- !type:ConditionPlayerCount # Allow when <= 15 players are online
minimumPlayers: 0
maximumPlayers: 15
action: Allow
#- !type:ConditionPlaytime
# minimumPlaytime: 1200 # 20 hours to be whitelisted
# action: Deny
- !type:ConditionAlwaysMatch
action: Deny