I'm using a custom script to change the message output style of TEXT and INPUT events, and this is also appending timestamps to every message by feeding -t to echo. The problem is that the timestamp shown is the current time instead of using the time from the ZNC playback buffer. If I close mIRC and reopen it, ZNC will feed it the backlog, and the timestamp for every message is the current time instead.

Is there any way I can customize channel message styles while also showing the correct ZNC timestamps?

Also another quick unrelated question: Is there any way I can get the number of servers (not networks) present in servers.ini as a variable for mIRC scripting?