This repository has been archived by the owner on Apr 29, 2020. It is now read-only.
Add config flag to dis/allow new accounts #6425
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are surely people hosting private servers for themselves or their friends who would prefer not have open registrations. True, the chance of someone port scanning you, finding your server, and logging in is minimal but most other server emulators offer an option to disable registration entirely. This PR adds that capability.
Adds new flag "account_creation" (true/false) in login_darkstar.conf file which permits new accounts to be created. Defaults to true. A one-line warning will also show at dsconnect startup if this flag is set False, as this could be a cause of issues or confusion if someone had done so inadvertently or had forgotten they'd done so.
Considerations:
If account creation is disabled, dsconnect will always return 0x04 ERROR_CREATE, which is visibly shown as "Username is taken" in xiloader. As xiloader only recognizes 4 status codes, this was the most suitable available. I considered adding a new 0x05 status to the xiloader code, but this would have no effect on existing installations and old versions or xiloader would show no feedback at all when attempting to create. Discussion on whether this function should use a new xiloader status code is welcomed.