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

Add /remote_mute and /remote_unmute commands #65

Merged
merged 4 commits into from
Jun 8, 2022
Merged

Conversation

S-S-X
Copy link
Member

@S-S-X S-S-X commented May 27, 2022

Allow global muting remote users (IRC, Discord) with /remote_mute name1 name2 name3... command.

Disabled by default, requires minetest.conf setting:

beerchat.enable_remote_mute = true

/remote_mute name1 name2 name3... command to mute remote users (block messages from these names).
/remote_unmute name1 name2 name3... command to unmute remote users (remove blocking of messages from these names).
/remote_unmute list currently muted remote names.

@S-S-X
Copy link
Member Author

S-S-X commented May 27, 2022

I've no idea if this works at all, used github web editor to write it... needs testing for real.

Mineunit fails because of some luarocks problem...

Error: Failed installing dependency: https://luarocks.org/say-1.3-1.rockspec - Error fetching file: Failed downloading https://github.com/Olivine-Labs/say/archive/v1.3-1.tar.gz - v1.3-1.tar.gz

edit. seems they've fixd it already

@S-S-X S-S-X changed the title Create remote_mute.lua Add /remote_mute and /remote_unmute commands May 27, 2022
@S-S-X
Copy link
Member Author

S-S-X commented Jun 1, 2022

Also this uses beerchat.jail.priv for chat commands, I think that's good enough and more can be added later if needed.
Beerchat could possibly have global setting for default chat moderator privilege.

@BuckarooBanzay
Copy link
Member

I've no idea if this works at all, used github web editor to write it... needs testing for real.

I tried this on the test-server with /remote_mute BuckarooBanzai and /remote_mute BuckarooBanzai@Discord but after both commands my messages still got though :/

@S-S-X
Copy link
Member Author

S-S-X commented Jun 1, 2022

I've no idea if this works at all, used github web editor to write it... needs testing for real.

I tried this on the test-server with /remote_mute BuckarooBanzai and /remote_mute BuckarooBanzai@Discord but after both commands my messages still got though :/

Well... I guess I know why. Should be bit more careful when trying to find out how stuff actually works:
https://github.com/minetest-beerchat/beerchat/blob/69400d640c5f6972ab3c69b955b012aecba53ad5/web/rx.lua#L14

You should have done just /remote_mute Discord and it would probably work... muting everyone on Discord :p

@S-S-X
Copy link
Member Author

S-S-X commented Jun 1, 2022

Also removed msg_data.name check because it is already checked just before callbacks https://github.com/minetest-beerchat/beerchat/blob/69400d640c5f6972ab3c69b955b012aecba53ad5/web/rx.lua#L5-L14

@BuckarooBanzay
Copy link
Member

BuckarooBanzay commented Jun 7, 2022

works 👍 but somehow the names don't pop up when i execute /list_muted 🤔 not sure it that's intentional

@S-S-X
Copy link
Member Author

S-S-X commented Jun 7, 2022

@BuckarooBanzay /list_muted is personal list, added commands are global moderator commands. /remote_unmute lists muted remote names. similar to /chat_unjail without any names.

@BuckarooBanzay
Copy link
Member

nice, i think this can be merged

@BuckarooBanzay BuckarooBanzay merged commit eaae526 into master Jun 8, 2022
@BuckarooBanzay BuckarooBanzay deleted the remote_mute branch August 20, 2022 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants