Warzone / mars

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

Allow the use of punishment commands through console #13

Open TBG1000 opened 2 years ago

TBG1000 commented 2 years ago

Issue:

Punishments may only be issued or reverted by staff members connected to the server. Server administrators and staff with access to the server's console should be able to execute such commands as well.

Background:

The /pun command and the /revertp command will only take a player as a sender, preventing the console from using them at all (will output "You must be a player to use this command").

Desired solution:

Allow the use of /pun and /revertp through the server's console. Note that these commands require GUI interaction if some flags or fields are not provided by the sender.

For example, executing /revertp <punishment id> without any input for the optional [reason] field will open a confirmation GUI in-game for the staff member to manipulate. Since this is not possible through the console, the lack of a reason should default to a pre-defined message such as "No reason provided".

The same applies to the /pun command, avoiding interference from GUI-required interaction.

Affected areas / files: