Remove unused arg from ctf_colors.get_color and ctf_colors.get_irc_color

This commit is contained in:
ClobberXD 2018-11-29 21:23:10 +05:30 committed by rubenwardy
parent e7d5044afb
commit 6f5bcd05d6
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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