Fix param passed to get_player_by_name being nil (#374)
This commit is contained in:
parent
b1da18dd86
commit
ab423cea90
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue