chest names only use alphanumerical and spaces
This commit is contained in:
parent
939f65db59
commit
7f68d51e2b
@ -740,6 +740,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
|
|
||||||
elseif fields.protect_name or fields.protect_rename then
|
elseif fields.protect_name or fields.protect_rename then
|
||||||
|
|
||||||
|
if fields.protect_name ~= string.match(fields.protect_name, "[%w%s_-]+")
|
||||||
|
or fields.protect_name:len() > 35 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- change chest infotext to display name
|
-- change chest infotext to display name
|
||||||
if fields.protect_name ~= "" then
|
if fields.protect_name ~= "" then
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user