diff options
-rw-r--r-- | init.lua | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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 |