mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-26 02:46:37 +02:00
6c98f7224a
Previously if a new history item was added (because someone sent a message) we would always append at the end of chat history buffer of the channel. Now we put the message at the position decided by the "time" message tag, which could be at the end but also slightly before that. * Upside: should result in a consistent chat history on all servers * Downside: if your server time is off for several seconds then it could look a little weird. Then again, it would already have looked weird in real live chat with timestamps and when replaying chat history probably. Also add some simple optimizations: in the log line object we now have direct pointers to the msgid and time strings, so the code doesn't need to do a find_mtag() all the time. This should lower CPU usage during log playback and also makes things more simple in the source code. I did some testing with various history injection variants but this needs more extensive testing.