Fix DM beeps w/ new translation
parent
9664255b3e
commit
c09272b39d
|
@ -94,11 +94,13 @@ minetest.register_globalstep(function()
|
|||
pending = {}
|
||||
end)
|
||||
|
||||
local dmtrans = minetest.translate("__builtin", "DM from XXX"):gsub("XXX.*", "")
|
||||
local function send(pname, text)
|
||||
text = tostring(text)
|
||||
|
||||
local msgtype
|
||||
if text:match("^%s*DM%sfrom%s") then msgtype = 1 -- DM
|
||||
if text:match("^%s*DM%sfrom%s") then msgtype = 1 -- DM (old style)
|
||||
elseif text:sub(1, #dmtrans) == dmtrans then msgtype = 1 -- DM (new style)
|
||||
elseif text:match("^%s*%<") then
|
||||
if text:lower():match(">.*" .. pname:lower():gsub("([^%w])", "%%%1")) then
|
||||
msgtype = 2 -- mention in public chat
|
||||
|
|
Loading…
Reference in New Issue