Fix shared chest failing to open for users with hyphen in their name (#33)

This commit is contained in:
MCLV 2024-12-17 18:49:11 +01:00 committed by GitHub
parent cc52a10811
commit e716e79640
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,7 +25,7 @@ local function check_privs(meta, player)
local shared = " " .. meta:get_string("shared") .. " "
if name == meta:get_string("owner") then
return true
elseif shared:find(" " .. name .. " ") then
elseif shared:find(" " .. name .. " ", 1, true) then
return true
else
return false