Revert "Send kills to IRC channel"

This reverts commit 460fd335ff.
This commit is contained in:
rubenwardy 2018-12-31 17:51:51 +00:00
parent 86cb53e185
commit bdf4598aa7
2 changed files with 0 additions and 32 deletions

View file

@ -1,4 +1,3 @@
ctf
ctf_match
hudkit
irc?

View file

@ -10,27 +10,6 @@ ctf_events = {
events = {}
}
local emoji = {
kill_bullet = ",-",
kill_grenade = "o'",
kill_sword = "+--",
}
local function get_colorcodes(name)
if not name then
return "", ""
end
local color = ctf_colors.get_irc_color(ctf.player(name))
local clear = "\x0F"
if color then
color = "\x03" .. color
else
color = ""
clear = ""
end
return color, clear
end
function ctf_events.post(action, one, two)
table.insert(ctf_events.events, 1, {
action = action,
@ -38,16 +17,6 @@ function ctf_events.post(action, one, two)
two = two
})
if minetest.global_exists("irc") and emoji[action] then
local color1, clear1 = get_colorcodes(one)
local color2, clear2 = get_colorcodes(two)
local tag1 = one and (color1 .. "_" .. clear1) or ""
local tag2 = two and (color2 .. "_" .. clear2) or ""
local name1 = one and (tag1 .. one .. tag1) or ""
local name2 = two and (tag2 .. two .. tag2) or ""
irc.say((name1 .. " " .. emoji[action] .. " " .. name2):trim())
end
while #ctf_events.events > NUM_EVT do
table.remove(ctf_events.events, #ctf_events.events)
end