summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/init.lua b/init.lua
index 29d54db..a7abe63 100644
--- a/init.lua
+++ b/init.lua
@@ -43,7 +43,7 @@ minetest.register_on_receiving_chat_messages(function(message)
end
if string.sub(message,1,1) == "<" then
msgtype = "channel"
- user,text = string.match(message,"^<(%g*)> (.*)$")
+ user,text = string.match(message,"^<([^%c ]*)> (.*)$")
if not user then
msgtype = "special"
text = message
@@ -53,18 +53,17 @@ minetest.register_on_receiving_chat_messages(function(message)
msgtype = "highlight_channel"
end
elseif string.sub(message,1,3) == "***" then
- user,msgtype,text = string.match(message,"^*** (%g*) (%g*) the game. ?(.*)$")
+ user,msgtype,text = string.match(message,"^*** ([^%c ]*) ([^%c ]*) the game. ?(.*)$")
if not text or text == "" then
text = "(Client Quit)"
end
elseif string.sub(message,1,1) == "*" then
msgtype = "action"
- user,text = string.match(message,"^* (%g*) (.*)$")
+ user,text = string.match(message,"^* ([^%c ]*) (.*)$")
if not user then
msgtype = "special"
text = message
- end
- if (user == player_name) or (string.match(user,"^(.*)@") == player_name) then
+ elseif (user == player_name) or (string.match(user,"^(.*)@") == player_name) then
msgtype = "sent_action"
elseif string.find(text,player_name) then
msgtype = "highlight_action"