summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2021-03-13 02:49:27 -0600
committercheapie <no-email-for-you@example.com>2021-03-13 02:49:27 -0600
commitfed283a19bd1fcf988fd01b8728aeb43078c64f6 (patch)
treee82d9f73382c3c1be0338280feec28329ba68c03
parentc1258412c43cd9f1657a96e44d2ad97baa069dda (diff)
downloadchat6-master.tar
chat6-master.tar.gz
chat6-master.tar.bz2
chat6-master.tar.xz
chat6-master.zip
Fix IRC message detectionHEADmaster
-rw-r--r--init.lua7
1 files 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