From d1c27c7e8037e9f438741ee5f7d3b6bda22d22a0 Mon Sep 17 00:00:00 2001 From: ANAND Date: Thu, 8 Aug 2019 21:34:46 +0530 Subject: Allow customizing chat message format (#8529) --- doc/lua_api.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 41061ed87..840841e6b 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -4156,6 +4156,12 @@ Chat * `minetest.chat_send_all(text)` * `minetest.chat_send_player(name, text)` +* `minetest.format_chat_message(name, message)` + * Used by the server to format a chat message, based on the setting `chat_message_format`. + Refer to the documentation of the setting for a list of valid placeholders. + * Takes player name and message, and returns the formatted string to be sent to players. + * Can be redefined by mods if required, for things like colored names or messages. + * **Only** the first occurrence of each placeholder will be replaced. Environment access ------------------ -- cgit v1.2.3