Skip to content
This repository has been archived by the owner on Aug 29, 2019. It is now read-only.

Commit

Permalink
Remove unused arg from ctf_colors.get_color and ctf_colors.get_irc_color
Browse files Browse the repository at this point in the history
  • Loading branch information
ClobberXD authored and rubenwardy committed Nov 29, 2018
1 parent e7d5044 commit 6f5bcd0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions ctf_chat/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 .. " **"))
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ctf_colors/hud.lua
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6f5bcd0

Please sign in to comment.