Limit chat message length
Recently on GunshipPenguin's Hungry Games server:
https://i.imgur.com/zRDdczp.jpg
The image shows some user posting an extremely long message repeating the word “DAY” over and over again. The message is so long, it fills the entire screen. It is very annoying.
The client-side workaround is easy: Hit [F2] and you hide the chat log. But this is not a real solution, because you also hide the legitimate chat.
The problem is not that some user spams the chat, but that stuff like this is possible in the first place.
I therefore suggest to add a length limit to chat messages on the server side. Messages which exceed a certain length are simply rejected.
On the client side, the client may simply not allow to type further characters at a certain point, because they would be rejected by the server anyways. Maybe the server first “tells” the clients the maximum allowed message length, so the client can apply this limit as well. But it is important that the real message length limit is applied by the server.
I think that 256 characters might be a good start, probably nobody wants to write legit messages which are so long. 256 characters are approximately needed to fill 2 lines in chat.
But this limit should be configurable in minetest.conf (just to be sure), even possible to disable it altogether (for whatever reason).
I want this to be part of the engine, and not just a mod. This is core behavior IMO.
https://i.imgur.com/zRDdczp.jpg
The image shows some user posting an extremely long message repeating the word “DAY” over and over again. The message is so long, it fills the entire screen. It is very annoying.
The client-side workaround is easy: Hit [F2] and you hide the chat log. But this is not a real solution, because you also hide the legitimate chat.
The problem is not that some user spams the chat, but that stuff like this is possible in the first place.
I therefore suggest to add a length limit to chat messages on the server side. Messages which exceed a certain length are simply rejected.
On the client side, the client may simply not allow to type further characters at a certain point, because they would be rejected by the server anyways. Maybe the server first “tells” the clients the maximum allowed message length, so the client can apply this limit as well. But it is important that the real message length limit is applied by the server.
I think that 256 characters might be a good start, probably nobody wants to write legit messages which are so long. 256 characters are approximately needed to fill 2 lines in chat.
But this limit should be configurable in minetest.conf (just to be sure), even possible to disable it altogether (for whatever reason).
I want this to be part of the engine, and not just a mod. This is core behavior IMO.
