diff --git a/mods/ctf/ctf_bounties/init.lua b/mods/ctf/ctf_bounties/init.lua index 5badf14..8da0251 100644 --- a/mods/ctf/ctf_bounties/init.lua +++ b/mods/ctf/ctf_bounties/init.lua @@ -2,11 +2,7 @@ local bountied_player = nil local bounty_score = 0 local function announce(name) - local bountied = ctf.player(bountied_player) - if ctf.player(name).team == bountied.team then - return - end - local tcolor = ctf_colors.get_color(bountied) + local tcolor = ctf_colors.get_color(ctf.player(bountied_player)) minetest.chat_send_player(name, minetest.colorize("#fff326", "The next person to kill ") .. minetest.colorize(tcolor.css, bountied_player) .. @@ -18,7 +14,10 @@ end local function announce_all() if bountied_player then for _, player in pairs(minetest.get_connected_players()) do - announce(player:get_player_name()) + local pname = player:get_player_name() + if ctf.player(pname).team ~= ctf.player(bountied_player).team then + announce(pname) + end end end end diff --git a/mods/ctf/ctf_chat/init.lua b/mods/ctf/ctf_chat/init.lua index bc66d5e..df69b01 100644 --- a/mods/ctf/ctf_chat/init.lua +++ b/mods/ctf/ctf_chat/init.lua @@ -248,9 +248,6 @@ minetest.register_chatcommand("t", { minetest.chat_send_player(name, "The team channel is disabled.") return end - if param == "" then - return false, "-!- Empty team message, see /help t" - end local tname = ctf.player(name).team local team = ctf.team(tname) diff --git a/mods/ctf/ctf_match/vote.lua b/mods/ctf/ctf_match/vote.lua index 2bfc622..eef2c6e 100644 --- a/mods/ctf/ctf_match/vote.lua +++ b/mods/ctf/ctf_match/vote.lua @@ -33,12 +33,10 @@ function ctf_match.vote_next(name) minetest.chat_send_all("Vote to skip match passed, " .. #results.yes .. " to " .. #results.no) - if can_vote_skip then - can_vote_skip = false - voted_skip = true - if flags_hold <= 0 then - skip() - end + can_vote_skip = false + voted_skip = true + if flags_hold <= 0 then + skip() end else minetest.chat_send_all("Vote to skip match failed, " ..