From e8987120cf6b7b83fbc72fefe4beaf658c3a5afe Mon Sep 17 00:00:00 2001 From: Aleteoryx Date: Thu, 25 Sep 2025 22:05:30 -0400 Subject: [PATCH] remove sixel trimming use \M in mention regex restart self with same arguments --- ntalk.tcl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ntalk.tcl b/ntalk.tcl index 93e74c7f7c15b53b3e4a4c167ec1a1b631eeca2d..0a55b28ea03e96b1f42c063b1a2f8387165ccaba 100755 --- a/ntalk.tcl +++ b/ntalk.tcl @@ -7,6 +7,7 @@ set scriptdir "${confdir}/cscript" set sixelpath "${confdir}/sixels.txt" file mkdir $confdir +set bootargs $argv proc quit {} {exit 0} proc runself args { @@ -14,6 +15,8 @@ proc runself args { exec [info nameofexecutable] $argv0 {*}$args & } proc restart args { + global bootargs + if {$args == {}} { set args $bootargs } runself {*}$args exit 0 } @@ -100,7 +103,6 @@ proc splitsixels {str} { foreach c [split $str {}] { switch -regexp -- $c { - { - set row [string trimright $row "? "] lappend ret $row set row {} } @@ -836,7 +838,7 @@ proc bufpush {line} { setmotd [string trim [string range $line 4 end]] set line "<<< $motd >>>" set tag motd - } elseif {[regexp "\[^\\w.\]${user}\[^\\w.\]" $line]} { + } elseif {[regexp "\[^\\w\]${user}\\M" $line]} { set tag mention }