Add logging to /t
This commit is contained in:
parent
b16d5c3b65
commit
e672344383
@ -1,5 +1,8 @@
|
|||||||
-- Get or add a team
|
-- Get or add a team
|
||||||
function ctf.team(name)
|
function ctf.team(name)
|
||||||
|
if name == nil then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
if type(name) == "table" then
|
if type(name) == "table" then
|
||||||
if not name.add_team then
|
if not name.add_team then
|
||||||
ctf.error("team", "Invalid table given to ctf.team")
|
ctf.error("team", "Invalid table given to ctf.team")
|
||||||
|
@ -251,13 +251,13 @@ minetest.register_chatcommand("t", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if ctf.player(name).team then
|
local tname = ctf.player(name).team
|
||||||
local team = ctf.team(ctf.player(name).team)
|
local team = ctf.team(tname)
|
||||||
if team then
|
if team then
|
||||||
for username, to in pairs(team.players) do
|
minetest.log("action", tname .. "<" .. name .. "> ** ".. param .. " **")
|
||||||
minetest.chat_send_player(username,
|
for username, to in pairs(team.players) do
|
||||||
"<" .. name .. "> ** " .. param .. " **")
|
minetest.chat_send_player(username,
|
||||||
end
|
tname .. "<" .. name .. "> ** " .. param .. " **")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(name,
|
minetest.chat_send_player(name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user