From 6f5bcd05d678811c86b6836786f97f3aafa67ffe Mon Sep 17 00:00:00 2001 From: ClobberXD Date: Thu, 29 Nov 2018 21:23:10 +0530 Subject: [PATCH] Remove unused arg from ctf_colors.get_color and ctf_colors.get_irc_color --- ctf_chat/init.lua | 8 ++++---- ctf_colors/hud.lua | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ctf_chat/init.lua b/ctf_chat/init.lua index 8ea6bc0..7e05165 100644 --- a/ctf_chat/init.lua +++ b/ctf_chat/init.lua @@ -343,7 +343,7 @@ minetest.register_chatcommand("t", { chatplus.log("<" .. name .. "> ** ".. param .. " **") end - local color, colorHex = ctf_colors.get_color(name, ctf.player(name)) + local color, colorHex = ctf_colors.get_color(ctf.player(name)) for username, to in pairs(team.players) do minetest.chat_send_player(username, minetest.colorize("#" .. colorHex:sub(3, 8), "<" .. name .. "> ** " .. param .. " **")) @@ -361,7 +361,7 @@ minetest.register_chatcommand("t", { if minetest.global_exists("irc") then function irc.playerMessage(name, message) local tname = ctf.player(name).team - local color = ctf_colors.get_irc_color(name, ctf.player(name)) + local color = ctf_colors.get_irc_color(ctf.player(name)) local clear = "\x0F" if color then color = "\x03" .. color @@ -383,7 +383,7 @@ if minetest.global_exists("chatplus") then end function chatplus.send_message_to_sender(from, msg) - local color, colorHex = ctf_colors.get_color(from, ctf.player(from)) + local color, colorHex = ctf_colors.get_color(ctf.player(from)) minetest.chat_send_player(from, minetest.colorize("#" .. colorHex:sub(3, 8), "<" .. from .. "> ") .. msg) end @@ -396,7 +396,7 @@ if minetest.global_exists("chatplus") then if ctf.setting("chat.default") ~= "team" then local team_name = ctf.player(from).team if team_name then - local color, colorHex = ctf_colors.get_color(from, ctf.player(from)) + local color, colorHex = ctf_colors.get_color(ctf.player(from)) minetest.chat_send_player(to, minetest.colorize("#" .. colorHex:sub(3, 8), "<" .. from .. "> ") .. msg) return false diff --git a/ctf_colors/hud.lua b/ctf_colors/hud.lua index 3fa5b08..5d87ab6 100644 --- a/ctf_colors/hud.lua +++ b/ctf_colors/hud.lua @@ -1,4 +1,4 @@ -function ctf_colors.get_color(name, tplayer) +function ctf_colors.get_color(tplayer) local team = ctf.team(tplayer.team) local tcolor_text = nil if team then @@ -12,7 +12,7 @@ function ctf_colors.get_color(name, tplayer) return tcolor_text, tcolor_hex end -function ctf_colors.get_irc_color(name, tplayer) +function ctf_colors.get_irc_color(tplayer) local team = ctf.team(tplayer.team) local tcolor_text = nil if team then @@ -34,7 +34,7 @@ function ctf_colors.update(player, name, tplayer) player = minetest.get_player_by_name(name) end - local tcolor_text, tcolor_hex = ctf_colors.get_color(name, tplayer) + local tcolor_text, tcolor_hex = ctf_colors.get_color(tplayer) if ctf.setting("colors.hudtint") then if tcolor_text == "red" or tcolor_text == "blue" then