From 0abd12b8a188cadf150b3b903321c70f9ae2b0c2 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 6 Apr 2018 13:31:54 +0100 Subject: [PATCH] Fix errors in previous commits --- mods/chatplus/init.lua | 4 ++-- mods/ctf_bounties/init.lua | 10 ++-------- mods/email/init.lua | 3 ++- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/mods/chatplus/init.lua b/mods/chatplus/init.lua index 44e1101..3eb2238 100644 --- a/mods/chatplus/init.lua +++ b/mods/chatplus/init.lua @@ -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 diff --git a/mods/ctf_bounties/init.lua b/mods/ctf_bounties/init.lua index a668545..2c96cb0 100644 --- a/mods/ctf_bounties/init.lua +++ b/mods/ctf_bounties/init.lua @@ -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) diff --git a/mods/email/init.lua b/mods/email/init.lua index 75df617..f15ff26 100644 --- a/mods/email/init.lua +++ b/mods/email/init.lua @@ -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)