Closed jauggy closed 1 month ago
I would define take a slightly different approach. Currently there are 2 types of bosses:
Usually when people host their own lobby it will start it on preset custom, getting voted boss in existing lobbies keeps the current preset (usually team, but can be anything that isn't custom).
Instead of tracking founder bosses I would check the boss type (president vs dictator or however you want to name it), dictator type bosses should block as they do now while president bosses shouldn't.
I would define take a slightly different approach. Currently there are 2 types of bosses:
- Elected presidents (voted in democratically, lobby has preset team and other players can keep voting, the boss's commands pass instantly without vote)
- Dictators (lobby has preset custom, only the boss can use commands)
Usually when people host their own lobby it will start it on preset custom, getting voted boss in existing lobbies keeps the current preset (usually team, but can be anything that isn't custom).
Instead of tracking founder bosses I would check the boss type (president vs dictator or however you want to name it), dictator type bosses should block as they do now while president bosses shouldn't.
I'll have a look into this. This will work too given that the main complainers are from the op lobby and that lobby never uses custom preset.
Alternative PR here: https://github.com/beyond-all-reason/teiserver/pull/372 (which has been approved by Lexon)
Context
Read discord here: https://discord.com/channels/549281623154229250/1258164084327579678
Currently someone who is boss of lobby will prevent any users on their blocklist from joining. For the OP lobby, this might be the only lobby they can actually join due to not many lobbies available for people at this skill level. Many people vote bosses for trivial things like rename/setting rating restrictions. If these commands were voteable, it's likely a boss would not be needed at all
Improvement Overview
This PR will differentiate between voted bosses and bosses who create a lobby from scratch. The OP lobby is usually one that is created by hijacking an existing lobby and voting up a boss. After this PR, the voted boss will not have their blocklist applied.
If you create a lobby from scratch, you will gain the label of "Founder boss" (couldn't think of a better name and am happy to change it). As founder boss, your blocklist will be applied to players who try and join. This makes the blocklist not completely useless and also creating a lobby from scratch requires a large wait time (up to an hour) and this guarantees a good first game with the price of having to wait a long time.
Other Details
>=
instead of>
to make it consistent with the wording in the site admin config. For example the admin config has config that says: "The raw number of players who would need to avoid someone to prevent them becoming a player". If you set the number to 4 you expect you need 4 or more to trigger not greater than 4.Local dev tests
Testing avoidance
Testing normal blocks
Testing founder boss blocks
$status
and ensure user1 is listed as founder boss. Now have user2 try and join the lobby. They will get a message that they are being blocked by the founder boss.Testing normal boss blocks
$status
and they should be listed as boss but not founder boss.Screenshots
Result of $status when there is founder boss![5](https://github.com/user-attachments/assets/e71cdbb7-b5a5-4642-9dd9-e9e77bcf6927)
Getting blocked by founder boss![2](https://github.com/user-attachments/assets/680c9fd3-b4f0-4487-af56-6cf18f8acad2)
Result of $status when there is a normal boss![4](https://github.com/user-attachments/assets/9c4c3235-25bc-474a-9b04-b7132c14d818)
Making it through even though the (normal) boss has blocked you![4](https://github.com/user-attachments/assets/fc392a7e-a639-49db-a72b-699f0ebc12cd)