~aleteoryx/ntalk

e8987120cf6b7b83fbc72fefe4beaf658c3a5afe — Aleteoryx 2 months ago 5fa37e0
remove sixel trimming

use \M in mention regex

restart self with same arguments
1 files changed, 4 insertions(+), 2 deletions(-)

M ntalk.tcl
M ntalk.tcl => ntalk.tcl +4 -2
@@ 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
	}