ModeratorGui
ModeratorGui
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:
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
andnewRank
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
Hi! This looks like an amazing plugin and I intend to use it so I can monitor my staff activity. I have one question though... I left everything in the config file as it was to begin with, and reported someone with an issue of reason 'test'. When I went to the index.htm, it asked me for a username. I presumed this was admin. I put the password as lolhappens, as defined in the config, but I just got a screen stuck on 'Waiting for the page to load, hold on...' Please help!
@Cuerdas
You can make it ban players, you can configure a list of commands to be performed when a report is made.
I have a question... This plugin ban users or you need a plugin to do it?
@larssss21
Most likely the jar is actually a zip file containing the actual jar and plugin folder. I've seen such things happen.
I don't get it. I put the .jar and the folder into the plugins folder like any other plugin but it doesn''t do anything! Nothing in the console, nothing in the plugins list, nothing! Too bad it's not working because this is an awesome plugin. Any fixes because it seems to be working for other people?
Wow i like this idea its going right on my server thanks make updates…YAY
@hipperdehopper
There's a PHP interface planned, though I've been delaying it a lot (that's me, procrastinator!). However, if you are capable of writing PHP code, know MySQL and can understand how reports are stored you should be able to make it yourself.
I'll look at the PHP interface for now though.
Hi how can I use this when my webhosting is on a other server than mc is on ?
Uploaded a new version! Awaiting approval...
Made ModeratorGui use sepperate passwords for users.
Made it possible to report from inside the WebGui.
Better error handling.
@Rmarmorstein
If your servers share databases then you're all set, just disable the web servers for all servers except one. Otherwise I don't know how you'd do it.
@flurryknox
That error happens when a web browser closes the connection before everything is received. Poor exception handling caused the error. Fixed for the next version.
@larssss21
If you get an error message in the console, paste(bin) it. If it doesn't even display a message in the console then make sure it is installed.
@user_892472
What text? The in-game text can be modified in the config. The text in the web GUI can also be modified, it only requires some knowledge of CSS, HTML and javascript. The multiple passwords feature I've been looong delaying. I'll try to get it in.
This is just what I've been looking for! I have a suggestion though:
- The ability to add extra passwords for your staff, so that they may review reports but each of them have individual passwords so I don't have to change it everytime a staffmember leaves/has to be removed. (I see you have this planned already ;) )
Hope you'll take this into consideration, it would be so helpfull to my server to have these features :)
EDIT:
- Also the text it quite annoying. I know it's just to help read the lines better, but perhaps there could be a config for this? Atleast I find it very confusing :)
EDIT:
- I also find the "close" command rather weird. It would be very nice if we could simply just remove the report by a command and through the website.
@heldplayer
Oooooooooooooooohhhhhhhhhhhhhhhhhhhh I got in now! :D thanks!
I installed V1.7.2 and V1.7 but both doesnt work. it doesnt work at all. sorry for bad explanation :p
Seems like the latest version of modGUI is getting broken pipes errors
http://pastebin.com/EjJC4n1X
Is it possible to link the reports to one GUI for all servers if i am using a cloud?
@Liger_XT5
If you want to save your data, downgrade to version 1.6 and run /modgui export to export it, then change back to version 1.7 and in the configuration, set config-version to 6 and run /modgui import
Otherwise delete the database and set config-version to 6. I forgot to update the config version before finishing up. Uploaded a new version of ModGui that fixes this but in the meanwhile changing it to 6 fixes that.
Just installed it and had the following error. deleted the database and restarted, same thing. Fresh install, haven't used it yet.
@billbertking1
ModeratorGui hosts a very basic HTTP server, you have to go to http://severIp:configPort/ to use the web interface.
I found the password in cofig.yml but it won't login. All it's doing is http:i.imgur.com/yjssc.png(photo too big for comment) and nothing's happening.
The fix to the issue I had was to add -Djava.io.tmpdir=/craftbukkit/temp to my java start line. The standard temp dir didn't allow non-privileged users to read/write to the temp directory.