summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_rollback.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-10-25 00:45:18 -0400
committerkwolekr <kwolekr@minetest.net>2015-10-25 23:06:48 -0400
commit54f1267c2c87daea769966c694777a2e5977f870 (patch)
treeae08897774c1b1d1ecae0ad1a31b147c9c98dd02 /src/script/lua_api/l_rollback.cpp
parent3936a5e3f71d46e61f819b8f6c85dd47a440f21e (diff)
downloadminetest-54f1267c2c87daea769966c694777a2e5977f870.tar.gz
minetest-54f1267c2c87daea769966c694777a2e5977f870.tar.bz2
minetest-54f1267c2c87daea769966c694777a2e5977f870.zip
SAPI: Mark all Lua API functions requiring envlock
Diffstat (limited to 'src/script/lua_api/l_rollback.cpp')
-rw-r--r--src/script/lua_api/l_rollback.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/lua_api/l_rollback.cpp b/src/script/lua_api/l_rollback.cpp
index 5744e6813..482b0cbf5 100644
--- a/src/script/lua_api/l_rollback.cpp
+++ b/src/script/lua_api/l_rollback.cpp
@@ -38,6 +38,8 @@ void push_RollbackNode(lua_State *L, RollbackNode &node)
// rollback_get_node_actions(pos, range, seconds, limit) -> {{actor, pos, time, oldnode, newnode}, ...}
int ModApiRollback::l_rollback_get_node_actions(lua_State *L)
{
+ NO_MAP_LOCK_REQUIRED;
+
v3s16 pos = read_v3s16(L, 1);
int range = luaL_checknumber(L, 2);
time_t seconds = (time_t) luaL_checknumber(L, 3);
@@ -79,6 +81,8 @@ int ModApiRollback::l_rollback_get_node_actions(lua_State *L)
// rollback_revert_actions_by(actor, seconds) -> bool, log messages
int ModApiRollback::l_rollback_revert_actions_by(lua_State *L)
{
+ MAP_LOCK_REQUIRED;
+
std::string actor = luaL_checkstring(L, 1);
int seconds = luaL_checknumber(L, 2);
Server *server = getServer(L);