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
@giffordj
Yes, this plugin supports MySQL, it uses the database you specify in bukkit.yml
@heldplayer
Do you have any idea when the plugin will be updated?
Keep getting a sqlite error on this.
Java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.7.2-libsqlitejdbc.so: /tmp/sqlite-3.7.2-libsqlitejdbc.so: failed to map segment from shared object: Operation not permitted
Does this plugin support mysql?
Sorry for my absence, my computer died. I will be updated as soon as possible!
@heldplayer
It would be helpful if you add a tutorial video
I'd love to view a live demo of this Plugin.
The version number of the file is incorrect, my bad! I have updated the filename, the file is made for 1.3 however so it should work.
Suggestion:
Add A Feature, to either add a Custom field to report in a new category. Or Add Warnings, and Jailings to the categorys
I am having the not loading problem, after i unput the password. Could this be anything to do with the file saying it is verison 1.2.5 and my server being 1.3.2?
Edit: i am navigating to the serverip:8273 and this is happening
New version has been uploaded, please wait while the file awaits approval.
Added /moderatorgui admin command with additional permissions
Added import and export commands and permissions
Added uninstall command and permissions
@heldplayer
I'd appreciate it very much if you'd remember ^_^
@guenael44
You're not supposed to access the HTML files directly, you launch the server and go to http://ip.of.the.server:8123/ to view the WebGui
@zedadiaswick
I will, if I don't forget which I seem to be doing a lot lately :/
@heldplayer
That sounds good. Is there any chance you'll be implementing this soon?
when i double clik on my html i have this : Waiting for the page to load, hold on...
After 1 hour nothing happen ...
Just because there was a nasty bug in the last version I made a quick fix and uploaded a new version. Please wait until the file is approved. Changelog:
Added config option to disable the internal webserver
Fix NPE when having no commands to perform when reporting something
@zedadiaswick
Yes, ModeratorGui uses a separate table to store all reports, if they lose their ID they will lose their connection to the system. Likewise, if their entry in said storage table gets removed, they will not exist to the plugin.
As to migrating, there is no such feature yet and it would require me to work with non-standard methods to transfer the data. What could work out is making an option to export everything to a flatfile format, and an import function as well. The import function would then import the flatfile that was saved by an export.
@XeonG8
I will be adding a feature to disable the internal web server, I have yet to start work on the PHP interface but it shouldn't be too hard for me to code. What I'm thinking of is an include.php file where you enter the database, username and password to connect, every file would then use that file to connect to the database.
@FactionCraftUK
That is caused by not having any commands to be performed when reporting something. I should have checked if it worked, this will be fixed in the next version. Sorry for the inconvenience.
@watarimon
Could you please provide me with a stack trace when trying to /report? As to the multiple servers, the tables can be shared, it just won't store which server it was reported on. If I'd store this with it I'd have to make run some queries when you update resulting in a whole lot more problems for SQLite users.
@mrchasez
Did you replace the old files with the new files after deleting the old files? And did you place them in /plugins/ModeratorGui/web/?
Last but not least, sorry if my response is a bit late, I have this bad habit of completely forgetting about something.
I do have a MySQL server available, can I migrate the data over to there easily with this plugin? I cannot get the SQLLite DB upgraded.
After updating, I had to delete HTML documents. Now they wont load. So Error code 404 - Not Found Unable to load the requested page :(
Please try again later
I would also like to see a version with support for external webserver.
Also support for multiple MC servers would be interesting, add a world/server variable to be set in the config or similar. I run multiple servers and would like to check mod reports from all of them at one place.
When starting the server with ModeratorGUI enabled I get this early in the log:
2012-07-30 20:53:06 [ALLVARLIG] ebean.properties not found
2012-07-30 20:53:06 [INFO] DataSourcePool [ModeratorGui] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
2012-07-30 20:53:06 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
2012-07-30 20:53:06 [INFO] trimming off 'is' from boolean field name isClosed in class me.heldplayer.ModeratorGui.tables.Issues
2012-07-30 20:53:06 [INFO] Entities enhanced[0] subclassed[6]
but further down it says:
2012-07-30 20:53:11 [INFO] [ModGui] Enabling ModeratorGui v1.3
2012-07-30 20:53:11 [INFO] [ModGui] Starting server on *:8273
2012-07-30 20:53:11 [INFO] [ModGui] Enabled!
When trying a /report issue playerX Test test. I get a "internal error..." ingame and theis in serverconsole:
org.bukkit.command.CommandException: Unhandled exception executing command 'report' in plugin ModeratorGui v1.3
and when i check the webpage the report is there.