hignore: add strip colors

This commit is contained in:
cron 2020-12-09 22:21:30 +00:00
parent be80a15bad
commit 087de58064
2 changed files with 11 additions and 1 deletions

View File

@ -78,6 +78,10 @@ local function log(message)
end
local function display(message)
if minetest.settings:get_bool("hignore_strip_colors") then
message = minetest.strip_colors(message)
end
local dm = message:match(".*rom (.*): .*")
local pub = message:match("<(.*)>.*")
local is_dm = false
@ -127,6 +131,11 @@ local function display(message)
message))
return true
end
if minetest.settings:get_bool("hignore_strip_colors") then
minetest.display_chat_message(message)
return true
end
end
minetest.register_on_receiving_chat_message(function(message)

View File

@ -2,4 +2,5 @@ hignore_log (Log highlighted/ignored/stripped messages) bool true
hignore_strip_all (Strip titles of all players) bool false
hignore_highlight_all (Highlight all player messages) bool false
hignore_highlight_all_color (Color to highlight all player messages) string "#FFFFFF"
hignore_ignore_all (Ignore all player messages) bool false
hignore_ignore_all (Ignore all player messages) bool false
hignore_strip_colors (Strip colors from messages before highlighting) bool false