From c5b51def061fb345b3f3ac2fb1b48b4c1d55d99b Mon Sep 17 00:00:00 2001 From: Aleteoryx Date: Sun, 21 Sep 2025 13:03:47 -0400 Subject: [PATCH] mentions --- ntalk.tcl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ntalk.tcl b/ntalk.tcl index e43b597dc6a4d3f48c50298f76d9e12a814d321f..7404babd8276d1e89bb0fb68c37bed085939ae1a 100755 --- a/ntalk.tcl +++ b/ntalk.tcl @@ -209,7 +209,8 @@ bind . restart bind . {.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