Fix crash in user limit again (hopefully)
This commit is contained in:
parent
825521b7ef
commit
27ec94c32f
1 changed files with 3 additions and 1 deletions
|
@ -4,5 +4,7 @@ minetest.register_can_bypass_userlimit(function(name, ip)
|
||||||
tonumber(minetest.settings:get("max_extra_users") or "10")
|
tonumber(minetest.settings:get("max_extra_users") or "10")
|
||||||
local req_score = tonumber(minetest.settings:get("userlimit_bypass_required_score") or "10000")
|
local req_score = tonumber(minetest.settings:get("userlimit_bypass_required_score") or "10000")
|
||||||
local can_connect = pstat and pstat.score > req_score and #minetest.get_connected_players() < actual_max_users
|
local can_connect = pstat and pstat.score > req_score and #minetest.get_connected_players() < actual_max_users
|
||||||
return can_connect and true or false
|
if can_connect then
|
||||||
|
return true
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in a new issue