From c2e7543ff3d0509d1b0a2c1e5b2de4adc9ac6a8e Mon Sep 17 00:00:00 2001 From: LoneWolfHT Date: Sun, 2 May 2021 22:23:41 -0700 Subject: [PATCH] Fix /me not showing to IRC properly --- mods/ctf/ctf_chat/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/ctf/ctf_chat/init.lua b/mods/ctf/ctf_chat/init.lua index bc66d5e..1c1dfd5 100644 --- a/mods/ctf/ctf_chat/init.lua +++ b/mods/ctf/ctf_chat/init.lua @@ -294,8 +294,10 @@ if minetest.global_exists("irc") then me_func = function(...) local message = irc.playerMessage(...) + local start_escape = message:sub(1, message:find("<")-1) - message = "*" .. message:sub(message:find(" ")) + -- format is: \startescape < \endescape playername \startescape > \endescape + message = message:gsub("\15(.-)"..start_escape, "* %1"):gsub("[<>]", "") irc.say(message) end