From fed283a19bd1fcf988fd01b8728aeb43078c64f6 Mon Sep 17 00:00:00 2001 From: cheapie Date: Sat, 13 Mar 2021 02:49:27 -0600 Subject: Fix IRC message detection --- init.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 505ba43..5bcd757 100644 --- a/init.lua +++ b/init.lua @@ -22,7 +22,6 @@ local function display_settings() "field[0.75,3;3,1;sendmsg;Sent Message Color;"..chat6.settings.fields.send_message_color.."]".. "field[0.75,4;3,1;join;Join Color;"..chat6.settings.fields.join_color.."]".. "field[0.75,5;3,1;part;Part Color;"..chat6.settings.fields.part_color.."]".. - --"checkbox[0.75,5.5;timestamps;Show Timestamps;"..chat6.settings.fields.timestamps.."]".. "button_exit[1,6.25;2,1;save;OK]" ) end @@ -84,9 +83,7 @@ local function get_nick_color(nick) end minetest.register_on_receiving_chat_message(function(message) - if color and type(color.strip_colors) == "function" then - message = color.strip_colors(message) - end + message = minetest.strip_colors(message) local msgtype local user local text @@ -98,7 +95,7 @@ minetest.register_on_receiving_chat_message(function(message) if string.sub(message,1,1) == "<" then local player_name = minetest.localplayer:get_name() msgtype = "channel" - user,text = string.match(message,"^<([^%c ]*)> (.*)$") + user,text = string.match(message,"^<(.-)> (.*)$") if not user then msgtype = "special" text = message -- cgit v1.2.3