Skip to content

Commit

Permalink
add /mapcleaner_max_lag command
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay authored and BuckarooBanzay committed Feb 3, 2020
1 parent 6391650 commit 6245958
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ minetest.register_chatcommand("mapcleaner_max_time", {
end
})

minetest.register_chatcommand("mapcleaner_max_lag", {
description = "sets the max lag value in seconds",
privs = { server = true },
func = function(name, params)
local value = tonumber(params)
if value then
mapcleaner.max_lag = value
storage:set_string("max_lag", value)
return true, "New value: " .. value

else
return true, "Value: " .. mapcleaner.max_lag
end
end
})

minetest.register_chatcommand("mapcleaner_step_interval", {
description = "sets the step_interval in seconds",
privs = { server = true },
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ group:save_in_at_nodedb
* **/mapcleaner_max_time [microseconds]** shows or sets the max cpu-time per step
* **/mapcleaner_step_interval [seconds]** shows or sets the seconds between intervals
* **/mapcleaner_run [true|false]** show, start or stop the process
* **mapcleaner_max_lag [seconds]** sets the max lag value where the mapcleaner stops running

All settings are persisted across restarts

Expand Down

0 comments on commit 6245958

Please sign in to comment.