Don't show log message if player doesn't actually view flag board

This commit is contained in:
rubenwardy 2015-07-14 16:10:26 +01:00
parent dd4a35f376
commit 6fd6c9b0df

View File

@ -69,7 +69,6 @@ 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