ModeratorGui

This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

ModeratorGui

Github

A simple plug-in to allow your server operators/moderators to report whatever they do. Supports reporting issues with players, bans, unbans, promotions and demotions.

Every type is color-coded. Issues are yellow, bans dark red, unbans dark green, promotions green and demotions red.

This plug-in runs a very basic HTTP server, only files in the plugins/ModeratorGui/web folder are accessible. To access the web GUI, you connect to port 8273, you have to enter the password specified in config.yml.

A list of ranks can be specified to limit what can be entered when reporting promotions or demotions.

The plugin will try to match usernames to players that have once joined the server with the in-game commands. Ranks will also be matched.

The Web GUI can be modified to your desire, but is limited to how the web server works.

If you find any bugs or issues, or if you have suggestions, please comment explaining the issue or suggestion.

A preview of the WebGui: A preview of the WebGui

Permissions

permissions:
  moderatorgui:
    default: op
    description: Command for full rights
    children:
      moderatorgui.command: true
      moderatorgui.command.admin: true
      moderatorgui.issue: true
      moderatorgui.ban: true
      moderatorgui.unban: true
      moderatorgui.promote: true
      moderatorgui.demote: true
      moderatorgui.review: true
      moderatorgui.viewreported: true
      moderatorgui.viewopenissues: true
      moderatorgui.export: true
      moderatorgui.import: true
      moderatorgui.uninstall: true
      moderatorgui.setpass: true
  moderatorgui.command:
    description: Allows using the plugin commands
  moderatorgui.command.admin:
    description: Allows using the admin commands
  moderatorgui.issue:
    description: Allows reporting issues with players
  moderatorgui.ban:
    description: Allows reporting banning a player
  moderatorgui.unban:
    description: Allows reporting unbanning a player
  moderatorgui.promote:
    description: Allows reporting promotions
  moderatorgui.demote:
    description: Allows reporting demotions
  moderatorgui.review:
    description: Allows reviewing reports
  moderatorgui.viewreported:
    description: "Allows seeing an issue when it's reported"
  moderatorgui.viewopenissues:
    description: Allows seeing wether a person has open issues
  moderatorgui.export:
    description: Allows exporting all reports to a binary file
  moderatorgui.import:
    description: Allows importing all reports from a binary file
  moderatorgui.uninstall:
    description: Allows deleting the database
  moderatorgui.setpass:
    description: Allows setting a password to be used on the webgui

Commands

/report help - Displays /report sub-commands

/report issue <playername> <issue> - Reports an issue

/report ban <playername> <reason> - Reports banning a player

/report unban <playername> <reason> - Reports unbanning a player

/report promote <playername> <oldrank> <newrank> <reason> - Reports promoting a player

/report promote <playername> <oldrank> <newrank> <reason> - Reports demoting a player

/review help - Displays /review sub-commands

/review [page] - Displays a page of reports

/review by <playername> [page] - Displays a page of reports reported by a playername

/review target <playername> [page] - Displays a page of reports that were reported about a player

/review close I:<id> [I:<id> [...]] - Closes a report of a certain type, currently only supported type is I for issue, can support multiple reports at once.

/moderatorgui - Displays /moderatorgui sub-commands (Aliases: /modgui, /mg)

/moderatorgui help - Displays /moderatorgui sub-commands

/moderatorgui setpass <password> - Sets a password linked to your name for the WebGui, the password is hashed. HOWEVER, the password will be visible in the console when you run the command.

/moderatorgui export - Exports the database into a binary file called data.bin in the plugin folder

/moderatorgui import - Imports a data.bin binary file that was created with ModeratorGui into the database, clearing the database beforehand. WARNING: this cannot be undone

/moderatorgui uninstall - Deletes the database and disables the plugin. Will not delete the plugin jar. WARNING: this cannot be undone

Config variables

The configuration has 2 sections where variables are used, the messages section and the perform section. Here is a list of the variables:

%id% - The id of the report

%target% - The name of the reported player

%reporter% - The name of the reporting player

%reason% - The reason of the report/action

%date% - The date of the report, using the standard ModGui date format

%oldrank% - Only used for promotions and demotions, the old rank of the player

%newrank% - Only used for promotions and demotions, the new rank of the player

Web requests for custom web-pages

All requests start with /GENERATED/ (case-sensitive)

/GENERATED/LOGIN/username/password
Returns a session that will be used for other requests followed by a list of available ranks sepperated by "/", or "invalid" if the supplied password was incorrect. The password has to be an SHA-256 encrypted string.
/GENERATED/LIST/session/request_flags
Returns a global list of reports, limited to a maximum of 500 results
/GENERATED/REPORTER/session/request_flags/username/
Returns a list of reports where the reporter is username, limited to a maximum of 500 results
/GENERATED/REPORTED/session/request_flags/username/
Returns a list of reports where the person being reported is username, limited to a maximum of 500 results
/GENERATED/REPORT/session/request_flags/reported/reason/previousRank/newRank//
Creates a new report, created by the user bound to the session. previousRank and newRank can be empty if it is not required.

Every mention of request_flags has to be replaced with a type filter. i for issues, b for bans, u for unbans, p for promotions and d for demotions. If you want to get all types you can leave it blank or send ibupd, this means that if any of the above flags are found it will find from all the supplied types. Do note that there are times that only one flag can be set.

Returned lists are in JSON format, a typical list would look like this (only displaying one of each type of report), newest reports are displayed first, the current reports are in no particular order.

[ {
  type: "issue",
  close: false,
  reporter: "adminname",
  reported: "somebaduser",
  time: "05-21-2012",
  reason: "He was being stupid"
}, {
  type: "ban",
  reporter: "adminname",
  reported: "somebaduser",
  time: "05-21-2012",
  reason: "He wanted to get banned"
}, {
  type: "unban",
  reporter: "adminname",
  reported: "somebaduser",
  time: "05-21-2012",
  reason: "He wanted to get unbanned"
}, {
  type: "promote",
  reporter: "adminname",
  reported: "somebaduser",
  time: "05-21-2012",
  reason: "He wanted to get promoted",
  prev: "default",
  new: "admin"
}, {
  type: "demote",
  reporter: "adminname",
  reported: "somebaduser",
  time: "05-21-2012",
  reason: "He was falsely promoted",
  prev: "admin",
  new: "default"
} ]

When a request is made with an invalid session, a 403 - Forbidden error will be supplied. When the server encounters an error, a stack trace is printed to the console and a 500 - Internal Server Error will be supplied.

Planned features

  • None currently

Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    39644
  • Created
    May 13, 2012
  • Last Released File
    Apr 27, 2013
  • Total Downloads
    10,199
  • License

Categories

Members

Recent Files