I see. Actually this may not have even been my problem.
My script was redirecting the znc buffer log into an @window instead of sending it into the channel.
To determine that it was from the znc buffer log I had a simple:
Which is how ZNC formats it. I noticed since upgrading to the latest mIRC it no longer worked.
Maybe there was code that changes how $nick is handled in situations where it is spoofed? Anyway, since that wasn't working anymore, I figured I could tell if it was an old buffer log by seeing if the @time= was being sent from irc.znc.in