From 18afd44cd13f37ad5f0a87c17e17c02ad7a1a33a Mon Sep 17 00:00:00 2001 From: Fang Date: Fri, 2 Dec 2016 22:06:16 +0100 Subject: [PATCH] Talk can now display a timestamp at the end of messages. Settings flag %showtime. --- app/talk.hoon | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/talk.hoon b/app/talk.hoon index f11946f4a..e64607e7f 100644 --- a/app/talk.hoon +++ b/app/talk.hoon @@ -293,6 +293,7 @@ %- perk :~ %noob %quiet + %showtime == ++ work %+ knee *^work |. ~+ @@ -2114,6 +2115,15 @@ ?. (~(has in sef) %noob) (~(sn-curt sn man [who (main who)]) |) (~(sn-nick sn man [who (main who)])) + ?: (~(has in sef) %showtime) + =+ dat=(yore now.hid) + =+ ^= t + |= a/@ ^- tape + %+ weld + ?: (lth a 10) "0" ~ + (scow %ud a) + =+ ^= time :(weld "~" (t h.t.dat) "." (t m.t.dat) "." (t s.t.dat)) + :(weld baw txt (reap (sub 67 (lent txt)) ' ') time) (weld baw txt) :: ++ tr-meta ^- tang