validate if fields sender is an actual player

fixes https://gitlab.com/4w/mtimer/-/issues/18
This commit is contained in:
Dirk Sohler
2021-05-08 20:56:14 +02:00
parent 90d005dcd6
commit c2d1d1019e

View File

@ -7,6 +7,7 @@ local d = mtimer.dialog
-- for this is very simple because most of the logic is handled in the
-- timer functions and not in the formspec code.
minetest.register_on_player_receive_fields(function(player, formname, fields)
if not player:is_player() then return end
local meta = player:get_meta()
local name = player:get_player_name()