.tm_ are temporary filenames used by mIRC. See versions.txt
7.Added $tempfn identifier that returns temporary filename located in
mIRC folder using same method that mIRC uses internally.
That's not in the /help yet, and is a little ambiguous, in that it just creates the string for what would be a temporarily 'safe' filename, and doesn't actually create the disk file.
When you /write to a file, mIRC uses a .tm_ as the temporary filename where it creates the altered file before deleting the original then renaming the .tm_ back to the original filename.
If you're seeing a .tm_ file, then either you have a script that's creating them using $tempfn or it's a leftover from a failed /write, /writeini, write to logfile, etc. If it's a remnant of a failed mIRC disk write, the file it should have been writing to is likely either missing or has no contents prior to the timestamp on that file.