summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt6
1 files changed, 6 insertions, 0 deletions
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
------------------