From 6ad285eb51efa0068755cfced464259d5a0dcd0d Mon Sep 17 00:00:00 2001 From: Aleteoryx Date: Fri, 17 Oct 2025 22:14:44 -0400 Subject: [PATCH] fixes --- ntalk.tcl | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/ntalk.tcl b/ntalk.tcl index 270a05ed9a28f30b5fe47cd0d566576e1a4adf82..4af95563a240c96bd1d5ef1bd9f08f8c0b1e8bbc 100755 --- a/ntalk.tcl +++ b/ntalk.tcl @@ -740,10 +740,12 @@ set sendqueue {} proc incoming {sok} { global next - while {[gets $sok line] != -1} { - eval $next [list $line] - } - if {[eof $sok]} { neterr } + if [catch { + while {[gets $sok line] != -1} { + eval $next [list $line] + } + if {[eof $sok]} { neterr } + }] { neterr } } proc sendl {line} { @@ -978,16 +980,16 @@ bind .foot.input [concat [bind .foot.input ] ";" { user { setuser $line } last { last $line } - send { send $line} + send { send $line } - motd { send "MOTD $line" } - me { send "${user} $line" } - my { send "${user}'s $line" } - think { send "${user} . o ( $line )" } - <= { send "${user} <= $line" } + motd { send "MOTD $line" } + me { send "${user} $line" } + my { send "${user}'s $line" } + idea { send "${user} . o ( $line )" } + <= { send "${user} <= $line" } eval { .foot.input insert 0 [eval $line] } - exec { .foot.input insert 0 [exec sh -c $line]} + exec { .foot.input insert 0 [exec sh -c $line] } calc { .foot.input insert 0 [expr $line] } n64k { .foot.input insert 0 [n64k_date] }