diff --git a/clientmods/hignore/init.lua b/clientmods/hignore/init.lua index 9e3e3bd07..f981c4500 100644 --- a/clientmods/hignore/init.lua +++ b/clientmods/hignore/init.lua @@ -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) diff --git a/clientmods/hignore/settingtypes.txt b/clientmods/hignore/settingtypes.txt index 109fcb308..eb50d8b9d 100644 --- a/clientmods/hignore/settingtypes.txt +++ b/clientmods/hignore/settingtypes.txt @@ -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 \ No newline at end of file +hignore_ignore_all (Ignore all player messages) bool false +hignore_strip_colors (Strip colors from messages before highlighting) bool false