mirror of
https://notabug.org/TenPlus1/protector.git
synced 2025-01-23 23:11:29 +01:00
fix check placement
This commit is contained in:
parent
7f68d51e2b
commit
a02149fff5
@ -740,14 +740,14 @@ 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
|
||||||
|
|
||||||
|
if fields.protect_name ~= string.match(fields.protect_name, "[%w%s_-]+")
|
||||||
|
or fields.protect_name:len() > 35 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
meta:set_string("name", fields.protect_name)
|
meta:set_string("name", fields.protect_name)
|
||||||
meta:set_string("infotext", fields.protect_name)
|
meta:set_string("infotext", fields.protect_name)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user