forked from Mirrorlandia_minetest/minetest
Fix crash on can_bypass_userlimit returning non-boolean
This commit is contained in:
parent
2aad3be2cb
commit
2af47e6f5f
@ -134,7 +134,6 @@ bool ScriptApiPlayer::can_bypass_userlimit(const std::string &name, const std::s
|
|||||||
lua_pushstring(L, name.c_str());
|
lua_pushstring(L, name.c_str());
|
||||||
lua_pushstring(L, ip.c_str());
|
lua_pushstring(L, ip.c_str());
|
||||||
runCallbacks(2, RUN_CALLBACKS_MODE_OR);
|
runCallbacks(2, RUN_CALLBACKS_MODE_OR);
|
||||||
FATAL_ERROR_IF(!lua_isboolean(L, -1), "on_user_limitcheck must return a boolean");
|
|
||||||
return lua_toboolean(L, -1);
|
return lua_toboolean(L, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user