hignore: fix patterns, make better for chat bridges
This commit is contained in:
parent
99eec7d996
commit
285b6801a0
@ -82,8 +82,8 @@ local function display(message)
|
|||||||
message = minetest.strip_colors(message)
|
message = minetest.strip_colors(message)
|
||||||
end
|
end
|
||||||
|
|
||||||
local dm = message:match(".*rom (.*): .*")
|
local dm = message:match(".*rom (.-): .*")
|
||||||
local pub = message:match("<(.*)>.*")
|
local pub = message:match("<(.-)>.*")
|
||||||
local is_dm = false
|
local is_dm = false
|
||||||
|
|
||||||
local player = dm or pub
|
local player = dm or pub
|
||||||
@ -111,7 +111,7 @@ local function display(message)
|
|||||||
|
|
||||||
-- strip title
|
-- strip title
|
||||||
if not is_dm and (hignore.strip[player] or minetest.settings:get_bool("hignore_strip_all")) then
|
if not is_dm and (hignore.strip[player] or minetest.settings:get_bool("hignore_strip_all")) then
|
||||||
message = message:match(".- | (.*)")
|
message = message:match(".- | (.*)") or message
|
||||||
if hignore.highlight[player] == nil then
|
if hignore.highlight[player] == nil then
|
||||||
minetest.display_chat_message(message)
|
minetest.display_chat_message(message)
|
||||||
return true
|
return true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user