For$
<!-- begin site header -->
<div id=

Author Topic: Transaction Logging (Anti-grief)  (Read 17485 times)

nathacof

  • Newbie
  • *
  • Posts: 12
    • View Profile
Transaction Logging (Anti-grief)
« 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:

Code: [Select]
# Rollback all changes stored in the binary log
/rollback
# 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:

http://www.youtube.com/watch?v=3MaApuaSVMM
« Last Edit: December 16, 2010, 02:53:44 am by nathacof »

nathacof

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Transaction Logging (Anti-grief)
« Reply #1 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.