Mineserver Community

Mineserver => Development => Topic started by: nathacof on December 14, 2010, 12:10:04 pm

Title: Transaction Logging (Anti-grief)
Post by: nathacof on December 14, 2010, 12:10:04 pm
So I mentioned this in another post, but wanted to give it a dedicated topic.

Finally finished the code for this feature. I'm now able to rollback changes to the server with the following commands:

# Rollback all changes stored in the binary log
# Rolback changes to a specific point in time (epoch)
/rollback <timestamp>
# Rollback changes based on timestamp (epoch) and user nickname
/rollback <timestamp> <nick>

Check it out here, https://github.com/nathacof/mineserver :D Next, to improve performance I am looking into adding indices on timestamp, and timestamp + user nickname.

Configuration Options:
(boolean) enable_binary_logging: enables transaction logging
(string) binary_log: the name of the binary log file

One bug I have seen, is that trees that are grown from saplings only have their bottom's reverted. Should be simple enough to detect that and remove any wood blocks that are above that block, then the leaf decay should take care of the rest. Also the binlog in it's current state is architecture dependent so it may not be easy to move binlogs from one arch to another.

Here's a video of it in action:


Title: Re: Transaction Logging (Anti-grief)
Post by: nathacof on January 21, 2011, 10:30:18 pm
Just got this working with the new plugin API let me know if you have any problems using it! Also I added a binlogdump cli tool to allow you to inspect the content of your binlog. xP

There are still more features I'd like to add like the /playback command, and possibly a command to determine who last modified a particular block.