I'd like to know how to get the messages entered by players to show up in chat.
I've set debug_log_level to 'verbose' (was 'action') and nothing changed.
If I remember correctly, minetesthosting.com's window thingy showed chat messages. I don't want to have to join the server to read chat, so Is there a way to do this?
How to get chat to show up in terminal?
- PolySaken
- Member
- Posts: 817
- Joined: Thu Nov 09, 2017 05:18
- GitHub: PolySaken-I-Am
- In-game: PolySaken
- Location: Wānaka, Aotearoa
- Contact:
How to get chat to show up in terminal?
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.
- PolySaken
- Member
- Posts: 817
- Joined: Thu Nov 09, 2017 05:18
- GitHub: PolySaken-I-Am
- In-game: PolySaken
- Location: Wānaka, Aotearoa
- Contact:
Re: How to get chat to show up in terminal?
So I made a mod that just print()s all the messages, but I feel like there is a better way.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.
- Hybrid Dog
- Member
- Posts: 2834
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: How to get chat to show up in terminal?
Printing directly what the player writes is dangerous because they can use the ASCII escape character to make all the text in your terminal invisible.
Instead of using print(msg), you can use minetest.log("action", msg).
To remove escape characters: minetest.log("action", msg:gsub(string.char(27), "ESC"))
Instead of using print(msg), you can use minetest.log("action", msg).
To remove escape characters: minetest.log("action", msg:gsub(string.char(27), "ESC"))
Who is online
Users browsing this forum: No registered users and 5 guests