diff options
author | orwell96 <mono96.mml@gmail.com> | 2017-05-15 13:37:06 +0200 |
---|---|---|
committer | orwell96 <mono96.mml@gmail.com> | 2017-05-30 09:20:01 +0200 |
commit | e484654f896a40910cdeefdc2ac64ea8e9556c89 (patch) | |
tree | 3871961349b93a2dfae4781a2f5c907370553b3b /advtrains/advtrains/nodedb.lua | |
parent | 74c8784b21c635ae310773e7105d22e3928a049a (diff) | |
download | advtrains-e484654f896a40910cdeefdc2ac64ea8e9556c89.tar.gz advtrains-e484654f896a40910cdeefdc2ac64ea8e9556c89.tar.bz2 advtrains-e484654f896a40910cdeefdc2ac64ea8e9556c89.zip |
Re-add debug ring buffer and print its contents on a lua crash
When the crash on linuxworks has been fixed, the ringbuffer will go into master and behind an option
also fix last commit
Diffstat (limited to 'advtrains/advtrains/nodedb.lua')
-rw-r--r-- | advtrains/advtrains/nodedb.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/advtrains/advtrains/nodedb.lua b/advtrains/advtrains/nodedb.lua index 7ebf755..4dc451a 100644 --- a/advtrains/advtrains/nodedb.lua +++ b/advtrains/advtrains/nodedb.lua @@ -286,7 +286,7 @@ local ptime=0 minetest.register_chatcommand("at_restore_ndb", { params = "", -- Short parameter description - description = "Write node db back to map", -- Full description + description = "Write node db back to map and find ghost nodes", -- Full description privs = {train_operator=true, worldedit=true}, -- Require the "privs" privilege to run func = function(name, param) return advtrains.pcall(function() @@ -298,5 +298,9 @@ minetest.register_chatcommand("at_restore_ndb", return true end) end, + privs = {train_operator=true}, -- Require the "privs" privilege to run + func = function(name, param) + ndb.restore_all() + end, -- Called when command is run. }) |