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

Adding lock and unlock ability command (lockdown) #521

Open
UponAnonymous opened this issue Apr 27, 2022 · 3 comments
Open

Adding lock and unlock ability command (lockdown) #521

UponAnonymous opened this issue Apr 27, 2022 · 3 comments
Labels
backend blocked blocked by external influences enhancement New feature or request help wanted Extra attention is needed prio-normal

Comments

@UponAnonymous
Copy link
Contributor

Currently on MASZ I see no way of temporarily stopping any form of mass trolling / spamming or raids.

That is why it could be good to have some form of command that can lock channels or even the whole server to prevent and protect users from any of these events.

Two possible ways to execute this command could be temporarily locking the channel/server with a duration or locking the channel/server until the unlock command is executed.
It should be noted that the lock command should include an optional reason.
A message as well could be sent to the channel/s informing users that the channels have been put in lockdown or it being removed.

The command could also be implemented with the log system by allowing the staff to see who exactly executed this command and the duration of the lockdown.

@UponAnonymous UponAnonymous added the enhancement New feature or request label Apr 27, 2022
@zaanposni
Copy link
Owner

Hi thanks for your suggestion.

This issue already exists as #347.
I still have no idea on how to lock channels without destroying someones permission system.

  • One way would be to implement a 6h cooldown in a channel, but that is not a real lock.
  • The other way would be to edit roles or permissions. But it might be very complicated to account for each scenario of server setup and still guarantee to restore the orginial state afterwards. I am happy for suggestions on the latter part.

However, I like your addition of a temporary lock with a given duration and reason. This improves the user experience.

That being said, as long as we find a solution, I will be happy to implement it in v3!

@zaanposni zaanposni added help wanted Extra attention is needed backend prio-normal blocked blocked by external influences labels Apr 27, 2022
@zaanposni zaanposni added this to the MASZ v3 milestone Apr 27, 2022
@UponAnonymous
Copy link
Contributor Author

The best way to do this would be to change all the roles that aren't staff to not send any messages in the channel. Then when the lockdown has ended, it then allows all the roles to message again.

Only thing to think about is, you might end up with making the bot change permissions on all the channels, including the staff ones.

The way I think you could do that is one of two ways, make it that it changes the permission for all the roles and then reverts it resulting in them not being altered in any way that would cause issues.
Or make it only change the channels that users can see in, meaning that if a channel only has staff roles in it, the channel can't be locked. But if the channel contains non staff roles, it can lock the channel by setting their permission to deny sending messages.

@zaanposni zaanposni removed this from the MASZ v3 milestone May 28, 2022
@FeroxFoxxo
Copy link
Contributor

FeroxFoxxo commented Sep 17, 2022

The easiest way is to go through each role with the "send messages" permission set to "allow" or "default" (believe these are in an enum), and store these values in a database (could use JSON as a method of converting this dictionary of roleID: permissionType), change these roles to have it as "deny", and when the /unlock command is run, revert these back. Of course, you'd ignore whichever IDs match that of mod or admin roles, but other than that it seems relatively straight forward :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend blocked blocked by external influences enhancement New feature or request help wanted Extra attention is needed prio-normal
Projects
None yet
Development

No branches or pull requests

3 participants