New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automated whitelists #23985
base: master
Are you sure you want to change the base?
Automated whitelists #23985
Conversation
Only people that are added to the whitelist with the addwhitelist command will be able to join. I call this the "legacy" whitelist
Default whitelist is now the "legacy" whitelist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, it looks like it would work for WizDen's needs, but changes could be made to improve readability of the prototype, and to make the system more flexible, potentially allowing it to be easier to use for other things in the future.
Adding support for playtime based ranges for the note condition is probably the thing that'd have the biggest impact on the effectiveness of the system for WizDen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a terminology nitpick, but to keep things flexible, I'd avoid using the term whitelist/blacklist. It's all just conditions or rules that contribute to an overall blacklist or whitelist system, using terminology that doesn't describe any of the conditions as a whitelist or blacklist can encourage people who make changes in the future to keep the design flexible.
It's not the "Minimum number of players required for this whitelist to be active", it's the "Minimum number of players required for this condition to match", because if the condition can be used flexibly enough, then it can be used as a whitelist or a blacklist
Content.Server/Connection/Whitelist/Conditions/ConditionNotes.cs
Outdated
Show resolved
Hide resolved
Content.Server/Connection/Whitelist/Conditions/ConditionNotes.cs
Outdated
Show resolved
Hide resolved
Content.Server/Connection/Whitelist/Conditions/ConditionNotes.cs
Outdated
Show resolved
Hide resolved
@Simyon264 you working on this famalams. |
Yes. I am still working on it. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
FYI, I am still working on it. |
Content.Server/Connection/Whitelist/Conditions/ConditionManualWhitelist.cs
Outdated
Show resolved
Hide resolved
Content.Server/Connection/Whitelist/Conditions/ConditionNotes.cs
Outdated
Show resolved
Hide resolved
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
About the PR
This PR adds automatic whitelists based on conditions defined in a prototype.
Why / Balance
Resolves #19606.
Technical details
This PR adds a
blacklist
table to the DB and the coresponding commands for managing the blacklist.I also added a new prototype
PlayerConnectionWhitelist
which is used to define whitelists. That prototype contains an Array ofWhitelistCondition
conditions. EveryWhitelistCondition
contains 2 DataFields and a Function to check if the player is allowed to connect. The 2 DataFields are the following:BreakIfConditionSuccess
: If the condition passes, the next conditions will not be checked and the player will be able to connect.BreakIfConditionFail
: If the condition fails, the player will be denied and the next conditions will not be checked.Media
Breaking changes
This removes some CVars related for whitelists, the legacy whitelists are used by default when
whitelist.enabled
is set to true. Usewhitelist.prototypeList
to define which whitelists should be used. Currently implemented whitelists are:mrpWhitelist
andbasicWhitelist
.