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

Simultaneous punishment prevention (Mars-8) #18

Closed
wants to merge 2 commits into from
Closed

Simultaneous punishment prevention (Mars-8) #18

wants to merge 2 commits into from

Conversation

@jellz
Copy link
Collaborator

jellz commented Jul 9, 2022

I think, for less complexity and latency, it would be better to handle double punishment prevention completely on the plugin side, as that is just one client of the API. The new endpoint would likely not be used by other clients, so it doesn't make sense for an API request-response to be required before issuing a punishment on the Minecraft server.

@GrowlyX
Copy link
Contributor Author

GrowlyX commented Jul 9, 2022

Sounds good. I initially went ahead with this design as I assumed this feature would need to be available network-wide, not just the server which the punishment was issued on.

The request solution was also done to make use of redis as a network-wide K/V cache, which wasn't available from the plugin itself. I personally think this isn't the best design either, and could be simplified by allowing the client itself to handle all the redis functionality for this feature. Let me know your thoughts and whether I should change this to act as a local feature or not.

@jellz
Copy link
Collaborator

jellz commented Jul 9, 2022

If a player needs to be banned or muted for breaking gameplay or chat rules, the moderators and player will all be on the same server. The only time network-wide double pun prevention would be necessary (in my eyes) is if two moderators are handling the same asynchronous reports (ie. submitted on the forum) at the same time, and they are not on the same MC server (which would be highly unusual). I think this feature should be implemented through a local cache on the plugin. It does not need to interface with the API or Redis.

@GrowlyX
Copy link
Contributor Author

GrowlyX commented Jul 9, 2022

If a player needs to be banned or muted for breaking gameplay or chat rules, the moderators and player will all be on the same server. The only time network-wide double pun prevention would be necessary (in my eyes) is if two moderators are handling the same asynchronous reports (ie. submitted on the forum) at the same time, and they are not on the same MC server (which would be highly unusual). I think this feature should be implemented through a local cache on the plugin. It does not need to interface with the API or Redis.

Cool. I'll change the logic to cache it locally.

@GrowlyX GrowlyX closed this by deleting the head repository Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants