diff options
author | ANAND <ClobberXD@gmail.com> | 2019-08-08 21:34:46 +0530 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2019-08-08 17:04:46 +0100 |
commit | d1c27c7e8037e9f438741ee5f7d3b6bda22d22a0 (patch) | |
tree | fa04794d876ec4c912add9fcca36eff4a18df016 /doc | |
parent | cc610c74a742511e04dce91b24d09c860ca7fa1b (diff) | |
download | minetest-d1c27c7e8037e9f438741ee5f7d3b6bda22d22a0.tar.gz minetest-d1c27c7e8037e9f438741ee5f7d3b6bda22d22a0.tar.bz2 minetest-d1c27c7e8037e9f438741ee5f7d3b6bda22d22a0.zip |
Allow customizing chat message format (#8529)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 6 |
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 ------------------ |