1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-16 18:01:40 +00:00

Allow customizing chat message format (#8529)

This commit is contained in:
ANAND 2019-08-08 21:34:46 +05:30 committed by rubenwardy
parent cc610c74a7
commit d1c27c7e80
10 changed files with 111 additions and 47 deletions

View file

@ -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
------------------