check for privs before resuming from formspec, just in case

This commit is contained in:
whosit 2025-04-05 07:56:27 +03:00
parent 8a2bb20925
commit 9276f239e2

View File

@ -427,6 +427,12 @@ core.register_on_player_receive_fields(
end
if fields.resume or fields.send or fields.quit then
-- check for correct privs again, just in case
if not core.check_player_privs(player_name, { server = true }) then
return true
end
-- check if there's anything wating for the formspec
local last = last_coro_by_player[player_name]
if not last then
return true -- nothing to resume