If log file corruption after crashes only happens when connected to multiple servers... how about keeping log files for multi-server connections seperated by including the $cid in the log's name? Like #chan.network.date.cid.log ...also that way log files would be written without a "buffer" again, fixing the mIRCStats issue. Not sure if this would work as I've never had corrupted logs after a crash (in spite of multi-server connections), but it's an idea.