Fix errors in previous commits

This commit is contained in:
rubenwardy 2018-04-06 13:31:54 +01:00
parent dc6c86d98c
commit 0abd12b8a1
3 changed files with 6 additions and 11 deletions

View file

@ -99,7 +99,7 @@ minetest.registered_chatcommands["msg"].func = function(name, param)
end
core.log("action", "PM from " .. name .. " to " .. sendto
.. ": " .. message)
core.chat_send_player(sendto, minetest.colorize(#00FF55,"PM from " .. name .. ": "
.. message))
core.chat_send_player(sendto, minetest.colorize("#00FF55",
"PM from " .. name .. ": " .. message))
return true, "Message sent."
end

View file

@ -24,9 +24,6 @@ local function bounty_player(target)
bountied_player = target
-- if minetest.global_exists("irc") then
-- irc:say("Player " .. bountied_player .. " has a bounty on their head!")
-- end
minetest.after(0.1, announce_all)
end
@ -44,12 +41,12 @@ local function bounty_find_new_target()
if #players > 0 then
bounty_player(players[math.random(1, #players)].name)
-- Score * K/D
-- bounty_score = -----------, or 500 (whichever is lesser)
-- 10000
bounty_score = (pstat.score * (pstat.kills / pstat.deaths)) / 10000
if bounty_score > 500
if bounty_score > 500 then
bounty_score = 500
end
end
@ -81,9 +78,6 @@ ctf.register_on_killedplayer(function(victim, killer)
bountied_player = nil
local msg = killer .. " has killed " .. victim .. " and received the prize!"
-- if minetest.global_exists("irc") then
-- irc:say(msg)
-- end
minetest.chat_send_all(msg)
end
end)

View file

@ -70,7 +70,8 @@ minetest.register_on_joinplayer(function(player)
if #inbox > 0 then
minetest.after(10, function()
minetest.chat_send_player(player:get_player_name(),
minetest.colorize(#00FF00,"(" .. #inbox .. ") You have mail! Type /inbox to recieve"))
minetest.colorize("#00FF00",
"(" .. #inbox .. ") You have mail! Type /inbox to recieve"))
end)
end
end)