Add command to initiate a vote for boss-restricted $-commands. #365
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.
Note: This PR should be considered a proof-of-concept/work-in-progress, and is submitted to request feedback/review. This is the first non-trivial Teiserver change that I've written, and I am not experienced with Elixir; so I'm not confident that I'm following the idiomatic patterns for the language.
Currently, a boss is often democratically elected in order to make a relatively-minor settings change, rather than for lobby management reasons. However, this is not-uncommonly subject to abuse; a player may lie (or just not tell the whole truth) to be voted as boss, and then they may take actions other than what the rest of the lobby expects.
This PR seeks to provide an alternative way for a democratic lobby to change certain settings, without electing a boss. It does so by making the following changes:
The general flow of these commands is as follows:
Some restrictions have been created for the above commands:
The following commands are currently whitelisted for voting:
The patch was tested in my local dev environment, but I plan to do additional polishing/testing. I am submitting this PR now for early feedback, particularly regarding any preferred ways to implement this feature, so that less work is wasted if a change in approach is needed.