[Mod] Rollback [0.1] [rollback] (WTFPL)

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

[Mod] Rollback [0.1] [rollback] (WTFPL)

by Jeija » Post

Hi everyone!
This mod can help lots of server admins and also player. I think this one or a similar one should be installed on every public minetest server!

Introducing... the Rollback Mod!

What this mod does
Imagine there is a griefer and several other players on your server. Unfortunately, you are not playing on the server.
You now want to repair the griefer's damage, but you don't want to destroy the other player's creations.
With this mod you can simply enter

Code: Select all

/rollback PLAYERNAME
into the ingame chat console and everything that PLAYERNAME did disappears.
You can also use

Code: Select all

/rollbacktime PLAYERNAME TIME
This means that everything PLAYERNAME did from TIME seconds ago till now disappears (make sure you dont reboot the system between destruction and rollback in this case)

How does it work?
This mod creates a logfile in its folder, one for each player. It logs every node the player digs and places.
It does NOT log the inventory and metadata (text sign, chest inventory, furnace inventory...)
It also cannot repair unloaded chunks! So make sure all the required chunks are loaded when doing a /rollback! You can also backup the log file in the mod's folder.
This mod does not log damage caused by other mods (pistons, nukes, ...) I can add this functionality if you'd like to.

What do you think about this Mod? What should I add?

Dependencies: none
License: WTFPL

Download
V 0.1 as .zip
Last edited by Jeija on Sat Jan 26, 2013 21:56, edited 1 time in total.
Redstone for minetest: Mesecons (mesecons.net)

User avatar
sfan5
Moderator
Posts: 3944
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

Amazing! :D
But I want a download Link!!
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Post

Download link added. Just had to wait until it finished uploading.
Last edited by Jeija on Thu Mar 01, 2012 18:39, edited 1 time in total.
Redstone for minetest: Mesecons (mesecons.net)

Jordach
Member
Posts: 4527
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

jeija wrote:I can add this functionality if you'd like to.
YES!!!
viewtopic.php?f=10&t=19056 Solar Plains Dev Server

User avatar
sdzen
Member
Posts: 1170
Joined: Fri Aug 05, 2011 22:33
Location: Paradise (your not allowed)

by sdzen » Post

love it putting it in my client for no real reason at all maybe to undo crazy things i do

Zen S.D.

The next generation of tranquility!
malheureusement mon français n'est pas bon :<
Owner of the Zelo's
In game name: MuadTralk, spdtainted, sdzen, sd zen, sdzeno

User avatar
jordan4ibanez
Member
Posts: 1895
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez
Location: Rhode Island, USA

by jordan4ibanez » Post

works like a charm
I've been gone for a long time

User avatar
Calinou
Moderator
Posts: 3166
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

Amazing. Wow.
Every public server should have this. :P

User avatar
Scott
Member
Posts: 100
Joined: Sun Nov 13, 2011 06:35

by Scott » Post

this is absolutely amazing, immensely practical
ubuntu would be #1, without unity

User avatar
Death Dealer
Member
Posts: 1379
Joined: Wed Feb 15, 2012 18:46
Location: Limbo
Contact:

by Death Dealer » Post

very cool feeling better about having a server running when im not around now:D
Keep calm and code python^_^

User avatar
Utilisatrice
Member
Posts: 103
Joined: Thu Feb 16, 2012 18:04

by Utilisatrice » Post

Amazing, thank you !!!

EDIT :

I just noticed a bug, if for example you do a rollback of 20 seconds and all the good contructions with more than 20 seconds and although we will be able to ever more removed
Last edited by Utilisatrice on Fri Mar 02, 2012 05:36, edited 1 time in total.

Jordach
Member
Posts: 4527
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

add this to krays server! :D
viewtopic.php?f=10&t=19056 Solar Plains Dev Server

User avatar
redcrab
Member
Posts: 831
Joined: Tue Dec 13, 2011 13:45
Location: France
Contact:

by redcrab » Post

That's a very nice idea
congratz
+1
0.4 for serious builder click here
Dedicated Minetest redcrab server forum at http://minetestbb.suret.net

It's nice to be important but it is more important to be nice.

User avatar
xyz
Member
Posts: 450
Joined: Thu Nov 10, 2011 14:25

by xyz » Post

What is player X removed some node, placed another, then player Y removed X's node and placed something else. Then we rollback all X's changes... what now? I mean, that mod should handle last "owner" of node.

Also, little improvement: use break if tonumber(logtime)<os.time()-tonumber(time)

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Post

What is player X removed some node, placed another, then player Y removed X's node and placed something else. Then we rollback all X's changes... what now? I mean, that mod should handle last "owner" of node.
That's right. Therefore: Don't repair things griefers destroyed! As minetest does not have a node owner system (without a mod), I cannot change that.
Redstone for minetest: Mesecons (mesecons.net)

User avatar
cisoun
Member
Posts: 232
Joined: Tue Apr 19, 2011 18:56
GitHub: cisoun
IRC: cisoun
In-game: cisoun
Location: Switzerland
Contact:

by cisoun » Post

Jordach wrote:add this to krays server! :D
It wouldn't work. It's a 0.3 server and mods aren't supported. But it was a good idea!
By the way, congratulation for this mod. It's one of the best so far.
Not here for a while due to some troubles between my graphic card and Minetest.
Cisoun's Texture Pack | The Conifers Mod (deprecated) | Faenza icons for Minetest |
Website

Jordach
Member
Posts: 4527
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

Lol, wish Kray moved his map.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server

User avatar
sdzen
Member
Posts: 1170
Joined: Fri Aug 05, 2011 22:33
Location: Paradise (your not allowed)

by sdzen » Post

he might if 0.4 ever turns into a stable release :) anyone who doesnt check celerons blog or doesnt like the bleeding edge need a home too so untill then suck it up :)

Zen S.D.

The next generation of tranquility!
malheureusement mon français n'est pas bon :<
Owner of the Zelo's
In game name: MuadTralk, spdtainted, sdzen, sd zen, sdzeno

User avatar
xyz
Member
Posts: 450
Joined: Thu Nov 10, 2011 14:25

by xyz » Post

Jeija wrote:
What is player X removed some node, placed another, then player Y removed X's node and placed something else. Then we rollback all X's changes... what now? I mean, that mod should handle last "owner" of node.
That's right. Therefore: Don't repair things griefers destroyed! As minetest does not have a node owner system (without a mod), I cannot change that.
You cannot stop your players from repairing their buildings that were griefed.
I think you can change it, just store player nickname who modified "that" node last. Maybe it'll be better to use sql? So you can select all "griefed" nodes with just one query.

User avatar
jordan4ibanez
Member
Posts: 1895
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez
Location: Rhode Island, USA

by jordan4ibanez » Post

this mod is very helpful to making other mods :D
I've been gone for a long time

User avatar
jordan4ibanez
Member
Posts: 1895
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez
Location: Rhode Island, USA

by jordan4ibanez » Post

Request: Admin roll back (only admins can rollback) maybe make an admin file that you can add in admins names and they can rollback griefers horrible changes
I've been gone for a long time

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Post

jordan4ibanez wrote:Request: Admin roll back (only admins can rollback) maybe make an admin file that you can add in admins names and they can rollback griefers horrible changes
This only works for admins already (At least I think so)
You have to have the "privs" priviledge to rollback. Normally only admins have that.
Redstone for minetest: Mesecons (mesecons.net)

User avatar
jordan4ibanez
Member
Posts: 1895
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez
Location: Rhode Island, USA

by jordan4ibanez » Post

alrighty thanks for the help
I've been gone for a long time

User avatar
jordan4ibanez
Member
Posts: 1895
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez
Location: Rhode Island, USA

by jordan4ibanez » Post

another request! /rollbackclear "playername"
clears the players log!

&

so that it clears it after a couple days!
Last edited by jordan4ibanez on Fri Mar 09, 2012 14:31, edited 1 time in total.
I've been gone for a long time

User avatar
sfan5
Moderator
Posts: 3944
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

+1 for this Request/Idea
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
cosarara97
Member
Posts: 180
Joined: Tue Nov 01, 2011 18:53

by cosarara97 » Post

This mod saved my world from griefers more than once, and I'm very happy with it, but now it's making my server crash every time an user logs in. It gives the following error:

Code: Select all

22:32:51: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: error running function 'on_step': .../minetest/games/minetest_game/mods/rollback/init.lua:8: attempt to index local 'player' (a nil value)
22:32:51: ERROR[main]: stack traceback:

In thread 7f3e79941740:
/build/buildd/minetestc55-201204161538/src/main.cpp:1726: int main(int, char**): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 7f3e79941740:
#0  int main(int, char**)
(Leftover data: #1  Dedicated server branch)
(Leftover data: #2  virtual void ServerMap::save(ModifiedState))
(Leftover data: #3  virtual void ServerMap::saveBlock(MapBlock*))
(Leftover data: #4  void ItemStack::serialize(std::ostream&) const)
Avortat
("Avortat" means aborted)
:D

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest