Comment 10 for bug 1784200

Revision history for this message
Notabilis (notabilis27) wrote :

So... after looking into the code, I am pretty much lost.

1) The error is currently gone, so I guess GunChleoc has used the motd command? Thanks!

2) I have no idea where the current motd command is saved on the server. Obviously it survives the restart of the (meta)server, so there should be some file containing it. But I wasn't able to find this file or find out how the variable within the metaserver is read/written. Hm. :-/

3) "Escaping" the chat entries is already done on a per-message basis. However, the function seems to be quite lenient and it crashes later on when trying to render the complete text. So I guess one way to fix this would be to provide a global "escape text" method that can be used by all code, independent of the chat. Unfortunately I fear that such a method would be quite computation intensive since it would have to parse the whole text (again). Maybe we can modify the render function to not throw an exception on release builds but silently drop the offending tag? Or print only the offending tag as text and interpret the rest of the richtext string? Not sure which is the best approach to fix this problem.

4) The broken autoscroll functionality didn't had anything to do with this bug, but is fixed now.

5) Currently, the "Welcome on metaserver" message is completely gone. Do you want me to re-implement it as a local message within the Widelands client for newer builds? Should the metaserver send the message as normal text (not as motd) for build 19 clients on connect? Both should be easy to do.
For trunk, I wouldn't read it from a lua file for now, though. If I am not mistaken, all UI strings are currently hardcoded so I would do that here as well until we start moving all of them to lua files.