~aleteoryx/ntalk

c5b51def061fb345b3f3ac2fb1b48b4c1d55d99b — Aleteoryx 2 months ago e8d9fff
mentions
1 files changed, 5 insertions(+), 2 deletions(-)

M ntalk.tcl
M ntalk.tcl => ntalk.tcl +5 -2
@@ 209,7 209,8 @@ bind . <Control-R> restart
bind . <Control-s> {.menu.opt invoke "show raw sixel codes"}

.buffer tag configure rawsixel -elide true -foreground DarkSlateGrey
.buffer tag configure motd -foreground DarkGreen -justify center -spacing1 5 -spacing3 5 -underline 1
.buffer tag configure motd -foreground DarkOliveGreen -justify center -spacing1 5 -spacing3 5 -underline 1
.buffer tag configure mention -foreground DarkOrchid4


### MENU ###


@@ 449,7 450,7 @@ proc recvlines {{bd 0}} {
}

proc bufpush {line} {
	global images motd
	global images motd user

	set tag {}
	if {[string first "MOTD:" $line] == 0} {


@@ 460,6 461,8 @@ proc bufpush {line} {
		set motd [string trim [string range $line 4 end]]
		set line "<<< $motd >>>"
		set tag motd
	} elseif {[regexp "\[^\\w.\]${user}\[^\\w.\]" $line]} {
		set tag mention
	}

	.buffer configure -state normal