sv_markchatlines was introduced there and then fixed shortly after.
This fix clearly takes in account the broken sv_logfiletimestamp behavior as said in the commit message:
This is compatible with sv_logfiletimestamp, i.e. only one timestamp appears in the chat line.
However, a few years later, sv_logfiletimestamp's behavior is fixed but the special handling in SERVER_SendChatMessage was never removed.
The first commit removes this special handling.
The second commit actually fixes the underlying problem which is that sv_logfiletimestamp doesn't keep track of terminating newlines when set to false.
Without the second commit the underlying problem can still be reproduced by finding a way to print something with no newline appended at the end and then turning the CVar off: even if the previous line had a terminating newline, turning the CVar back on won't print a timestamp for the next line thus revealing the original problem.
Here is a way to achieve such a thing:
:this line should have a timestamp
:but it does not
Put this directly in the server's console line by line with/without the second commit to test the fix.
Thanks a lot for the detail analysis and the fix! Looks perfect.