sourcemaker/XrayInformer — Issue #3: Urgent: Autoban/AutoAlert
Author: don4of4
Created: 2012-01-05 02:30:21+00:00
State: open

#Summary
I was thinking of the recent issue of the fact that it is too difficult to lookup players name and the recent suggestion to add a list or similar device, but I have come to the realization that with the current system that is too add to implement QUICKLY. I recommend that you use the following quick fix to solve the issue for now as with the ore obfuscation plugin now out of date the need for this plugin is going to skyrocket.

##Solution
The solution to this system is dreadfully simple... Add two config options:
* A maximum acceptable percentage.
* The command to execute when the acceptable percentage is met. (replace %player% in the string with the offending players name)

Now, as I suggested before, add a listener for blockbreak diamondore, lapisore and redstoneore and whenever these are broken to lookup the statistics for that player and if they are above the percentage execute the command. This allows *automated banning* OR *automated alerts* (to staff).

##Pitfalls to be aware of:
* Remember, ores come in groups. Do not lookup the player statistics EVERY block. Maintain a map in memory of players that have been lookedup with the value being a timestamp. If the timestamp is within a minute of the time it is accessed, skip the player lookup this time.
* Be sure to define limits on the number of entries for LB to return. Some of my users have over 300000 block edits and that will cause lag if it looks up that much. Add a LIMIT parameter.