Skip to content
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

Channel based bans #75

Merged
merged 2 commits into from
Feb 21, 2023
Merged

Channel based bans #75

merged 2 commits into from
Feb 21, 2023

Conversation

S-S-X
Copy link
Member

@S-S-X S-S-X commented Feb 15, 2023

Implements #29

Allows banned players to read channel but disallows sending messages.

Might work, didn't test, didn't try if minetest can load this. So might work but I've no idea really...

Requires enabling extension with following configuration (minetest conf file):

beerchat.enable_ban = true

Commands:

Command What it does
/channel_ban player_name [player_name ...] Add bans for players on current channel
/channel_unban [player_name ...] Removes bans for players on current channel
/channel_unban Lists banned names on current channel

Missing stuff:

  • Should allow channel name with /channel_ban #main Sam, currently always operates on active channel.
  • Same for /channel_unban #main Sam
  • Maybe add optional flag to also ban reading channel instead of just disallowing writing to channel.
    Reading is allowed simply to allow reading public info channels and currently this is most important actual use case for channel bans.
    In other words to prevent writing to some public channels like main chat channel without actually removing player from that channel.

Does not check if player exists, this should allow also banning external names. Not sure if this is really needed because there's also /remote_mute from another extension (bit different but still similar).

@S-S-X S-S-X added the enhancement New feature or request label Feb 15, 2023
@S-S-X S-S-X marked this pull request as ready for review February 17, 2023 20:55
Write storage, restructure, add info messages

Fix all bugs

Fix all documentation

Add crash prevention feature

dos2unix
Load auth for tests

Disable invalid player name smoke test
@S-S-X
Copy link
Member Author

S-S-X commented Feb 19, 2023

Plan was to extend this later with option to also ban reading channel / joining channel. Possibly also include /channel_kick here.

But not here, not going to add any of those additional features until fate of this PR is decided. This is what is needed to solve real issues, imaginary issues can be solved later.

@wsor4035 wsor4035 merged commit 03500f9 into master Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants