Don't show log message if player doesn't actually view flag board
This commit is contained in:
parent
dd4a35f376
commit
6fd6c9b0df
@ -68,8 +68,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
-- Flag interface
|
-- Flag interface
|
||||||
function ctf.gui.flag_board(name,pos)
|
function ctf.gui.flag_board(name, pos)
|
||||||
ctf.log("gui", name .. " views flag board")
|
|
||||||
local flag = ctf_flag.get(pos)
|
local flag = ctf_flag.get(pos)
|
||||||
if not flag then
|
if not flag then
|
||||||
return
|
return
|
||||||
@ -80,13 +79,15 @@ function ctf.gui.flag_board(name,pos)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if ctf.can_mod(name,team) == false then
|
if not ctf.can_mod(name, team) then
|
||||||
if ctf.player(name) and ctf.player(name).team and ctf.player(name).team == team then
|
if ctf.player(name).team and ctf.player(name).team == team then
|
||||||
ctf.gui.show(name, "news")
|
ctf.gui.show(name)
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
ctf.log("gui", name .. " views flag board")
|
||||||
|
|
||||||
local flag_name = flag.name
|
local flag_name = flag.name
|
||||||
|
|
||||||
if not ctf.setting("flag.names") then
|
if not ctf.setting("flag.names") then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user