Warzone / mars

All-in-one plugin for PGM servers
GNU Affero General Public License v3.0
9 stars 3 forks source link

Prevent repeat / simultaneous / accidental punishments against a single user #8

Open TBG1000 opened 2 years ago

TBG1000 commented 2 years ago

Issue:

Staff members may accidentally punish a user for the same reason / length at the same time, piling up the user's punishment history and requiring one of the duplicate punishments to be reverted.

Background / pre-existing solutions:

Before the switch from TGM to PGM, the aforementioned issue was mitigated with WarzoneMC/tgm#711. This change added a 10 second cooldown after each punishment was delivered. If another staff member attempted to punish the same user while the cooldown was active, a message like the following would be displayed:

image

Resending the command to confirm was useful for cases where the repeat punishment(s) may not have been accidental, or may not have been the same type/length as the first punishment that went through.

Affected areas / files: