From bdf4598aa778f65434d9c8124d42e17400afdecc Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Mon, 31 Dec 2018 17:51:51 +0000 Subject: [PATCH] Revert "Send kills to IRC channel" This reverts commit 460fd335ffa88cac1f1d4b55fabff4a6d3bd3978. --- mods/ctf_events/depends.txt | 1 - mods/ctf_events/init.lua | 31 ------------------------------- 2 files changed, 32 deletions(-) diff --git a/mods/ctf_events/depends.txt b/mods/ctf_events/depends.txt index 4228c2a..455ba3b 100644 --- a/mods/ctf_events/depends.txt +++ b/mods/ctf_events/depends.txt @@ -1,4 +1,3 @@ ctf ctf_match hudkit -irc? diff --git a/mods/ctf_events/init.lua b/mods/ctf_events/init.lua index 773c159..8d30f2d 100644 --- a/mods/ctf_events/init.lua +++ b/mods/ctf_events/init.lua @@ -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