tii

Tcl-based suite for working with ii/idec protocol
git clone git://git.luxferre.top/tii.git
Log | Files | Refs | README

commit a36e5f3473d8df47b41f7d0de2bb20d464460043
parent 8981e6cfc81a5e4bb10c19b908a9152634c53822
Author: Luxferre <lux@ferre>
Date:   Mon, 21 Oct 2024 23:30:51 +0300

added ts guard

Diffstat:
Mtiiview.tcl | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tiiview.tcl b/tiiview.tcl @@ -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"