fixed error

master
DonBatman 2016-07-18 18:19:19 -07:00
parent 921d1858af
commit cfea34f9b3
1 changed files with 4 additions and 2 deletions

View File

@ -18,8 +18,10 @@ for _, nm in pairs(bad_names) do
minetest.register_on_prejoinplayer(function(name, ip)
local n = string.find(string.lower(name),nm)
local wp, err = io.open(minetest.get_worldpath().."/players/"..name, "r")
if wp then return end
wp:close()
if wp then
wp:close()
return
end
if n ~= nil then
return "\nThe name .."..name.." is not allowed\n\nPlease pick a different Name."
end