added ts guard

This commit is contained in:
Luxferre
2024-10-21 23:30:51 +03:00
parent 8981e6cfc8
commit a36e5f3473
+4 -1
View File
@@ -58,7 +58,10 @@ proc formatmessage {msgdata msgid globalwidth} {
set subj [lindex $msglines 6]
set msgbody [tiiflow [lrange $msglines 8 end] $globalwidth]
set tz ""
set renderedts [clock format $timestamp -format {%Y-%m-%d %H:%M:%S} -timezone $tz]
set renderedts ""
catch { # because some servers don't provide timestamps
set renderedts [clock format $timestamp -format {%Y-%m-%d %H:%M:%S} -timezone $tz]
}
catch { # because pipe can be broken anytime
puts "\[$renderedts\] ii://$msgid"
puts "$echoarea - $msgfrom ($msgfromaddr) to $msgto"