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

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

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

by Jeija » Thu Mar 01, 2012 18:34

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
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
/rollback PLAYERNAME

into the ingame chat console and everything that PLAYERNAME did disappears.
You can also use
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Thu Mar 01, 2012 18:37

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

by Jeija » Thu Mar 01, 2012 18:39

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)
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Thu Mar 01, 2012 18:42

jeija wrote:I can add this functionality if you'd like to.


YES!!!

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
sdzen
Member
 
Posts: 1170
Joined: Fri Aug 05, 2011 22:33

by sdzen » Thu Mar 01, 2012 18:45

love it putting it in my client for no real reason at all maybe to undo crazy things i do
[h]Zen S.D.[/h] 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: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Thu Mar 01, 2012 19:02

works like a charm
If you can think it, you can make it.
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Thu Mar 01, 2012 19:21

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

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

by Scott » Fri Mar 02, 2012 00:21

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

by Death Dealer » Fri Mar 02, 2012 00:49

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

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

by Utilisatrice » Fri Mar 02, 2012 04:21

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.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Fri Mar 02, 2012 07:57

add this to krays server! :D

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

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

by redcrab » Fri Mar 02, 2012 08:50

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: 449
Joined: Thu Nov 10, 2011 14:25

by xyz » Fri Mar 02, 2012 11:51

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

by Jeija » Fri Mar 02, 2012 16:12

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: 230
Joined: Tue Apr 19, 2011 18:56
GitHub: cisoun
IRC: cisoun
In-game: cisoun

by cisoun » Fri Mar 02, 2012 19:34

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
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Fri Mar 02, 2012 20:11

Lol, wish Kray moved his map.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
sdzen
Member
 
Posts: 1170
Joined: Fri Aug 05, 2011 22:33

by sdzen » Fri Mar 02, 2012 20:37

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 :)
[h]Zen S.D.[/h] 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: 449
Joined: Thu Nov 10, 2011 14:25

by xyz » Sat Mar 03, 2012 08:46

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: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Mon Mar 05, 2012 02:34

this mod is very helpful to making other mods :D
If you can think it, you can make it.
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Thu Mar 08, 2012 04:40

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
If you can think it, you can make it.
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Thu Mar 08, 2012 05:08

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: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Thu Mar 08, 2012 12:24

alrighty thanks for the help
If you can think it, you can make it.
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Fri Mar 09, 2012 14:31

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.
If you can think it, you can make it.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Fri Mar 09, 2012 16:13

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

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

by cosarara97 » Sat Apr 21, 2012 20:48

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:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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
 

Lelix
Member
 
Posts: 94
Joined: Sat Apr 14, 2012 12:51

by Lelix » Sun Apr 22, 2012 12:47

very functional and useful. very good. But I have a doubt: if you create a file does not increase the player's memory and slows down the game?
 

whiskers75
Member
 
Posts: 30
Joined: Sun Jun 17, 2012 06:15

by whiskers75 » Sun Jul 01, 2012 16:16

Please log metadata and DEFINETLY OTHER MODS. Also add chest items, if possible.
Oh and store logs IN THE WORLD FOLDER! Otherwise /rollback on other maps will pop up a lot of blocks in random places (!)
Last edited by whiskers75 on Sun Jul 01, 2012 16:19, edited 1 time in total.
 

jpenguin
Member
 
Posts: 46
Joined: Wed Jun 06, 2012 00:19

by jpenguin » Sun Jul 01, 2012 21:21

..and make it so you can right-click a block with a stick and see it's history
 


Return to Old Mods

Who is online

Users browsing this forum: No registered users and 2 guests

cron