I don't know if this has been fixed in a newer version, but I can't find any information on it as is.
Here's what happens.
Someone is in the same channel as I am always.
That person and I speak in private messages.
The query window records the log just fine until midnight.
Cause even if he changes his nickname right before midnight, it still records it in the appropriate logfile name, his original nickname for the query window.
However, when midnight is crossed, it records the new nickname instead.