Fix param passed to get_player_by_name being nil (#374)

This commit is contained in:
ANAND 2019-03-17 16:19:00 +05:30 committed by rubenwardy
parent b1da18dd86
commit ab423cea90

View file

@ -32,14 +32,14 @@ ctf_map.map = nil
local map_str local map_str
local old_server_status = minetest.get_server_status local old_server_status = minetest.get_server_status
function minetest.get_server_status(name, joined) function minetest.get_server_status(name, joined)
local status = old_server_status() local status = old_server_status(name, joined)
if not ctf_map.map or not map_str then if not ctf_map.map or not map_str then
return status return status
end end
local str = map_str local str = map_str
if minetest.get_player_by_name(name) then if name and minetest.get_player_by_name(name) then
str = minetest.colorize("#44FF44", str) str = minetest.colorize("#44FF44", str)
end end
status = status .. "\n" .. str status = status .. "\n" .. str