mirror of
https://github.com/urbit/shrub.git
synced 2024-12-13 16:03:36 +03:00
add timestamps and textual names for = in chat
This commit is contained in:
parent
2f2112f153
commit
0dd086550d
@ -10,6 +10,7 @@
|
|||||||
%monitor
|
%monitor
|
||||||
%noob
|
%noob
|
||||||
%quiet
|
%quiet
|
||||||
|
%time
|
||||||
[%tower p=@p]
|
[%tower p=@p]
|
||||||
[%s p=path]
|
[%s p=path]
|
||||||
==
|
==
|
||||||
@ -98,20 +99,36 @@
|
|||||||
%- trip
|
%- trip
|
||||||
%^ cat 3 %^ cat 3 (scot %p p.from) ' ' q.from
|
%^ cat 3 %^ cat 3 (scot %p p.from) ' ' q.from
|
||||||
++ rend
|
++ rend
|
||||||
|= [from=idad msg=^mess pre=tape] :: roo=^room
|
|= [from=idad msg=^mess pre=tape tim=@da] :: roo=^room
|
||||||
|
=+ tst=(lien flags |=(a=flag ?=(%time a)))
|
||||||
^- tank
|
^- tank
|
||||||
?- -.msg
|
?- -.msg
|
||||||
%do =+ mes=?:(=(0 p.msg) "remains quietly present" (trip p.msg))
|
%do
|
||||||
:- %leaf
|
=+ mes=?:(=(0 p.msg) "remains quietly present" (trip p.msg))
|
||||||
"{pre}{(idt from)} {mes}"
|
:- %leaf
|
||||||
%exp :~ %rose
|
%+ weld
|
||||||
[" " "" ""]
|
?. tst "" (timestamp tim)
|
||||||
:- %leaf
|
"{pre}{(idt from)} {mes}"
|
||||||
"{pre}{(idt from)} {(trip p.msg)}"
|
%exp
|
||||||
q.msg
|
:~ %rose
|
||||||
==
|
[" " "" ""]
|
||||||
%say [%leaf "{pre}{(idt from)}: {(trip p.msg)}"]
|
:- %leaf
|
||||||
|
%+ weld
|
||||||
|
?. tst "" (timestamp tim)
|
||||||
|
"{pre}{(idt from)} {(trip p.msg)}"
|
||||||
|
q.msg
|
||||||
|
==
|
||||||
|
%say
|
||||||
|
:- %leaf
|
||||||
|
%+ weld
|
||||||
|
?. tst "" (timestamp tim)
|
||||||
|
"{pre}{(idt from)}: {(trip p.msg)}"
|
||||||
==
|
==
|
||||||
|
++ timestamp
|
||||||
|
|= t=@da
|
||||||
|
=+ da=(yell t)
|
||||||
|
"{?:((gth 10 h.da) "0" "")}{(scow %ud h.da)}:".
|
||||||
|
"{?:((gth 10 m.da) "0" "")}{(scow %ud m.da)} "
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
==
|
==
|
||||||
@ -127,6 +144,7 @@
|
|||||||
sta=*station :: station
|
sta=*station :: station
|
||||||
sub=*(list path) :: subscriptions
|
sub=*(list path) :: subscriptions
|
||||||
tod=*(map ,@p ,@ud) :: outstanding, friend
|
tod=*(map ,@p ,@ud) :: outstanding, friend
|
||||||
|
tst=| :: timestamp mode
|
||||||
wak=_@da :: next heartbeat
|
wak=_@da :: next heartbeat
|
||||||
==
|
==
|
||||||
[who=`@p`-< how=`path`->]
|
[who=`@p`-< how=`path`->]
|
||||||
@ -145,6 +163,7 @@
|
|||||||
?: (lien args |=(a=flag &(?=(^ a) ?=(%s -.a))))
|
?: (lien args |=(a=flag &(?=(^ a) ?=(%s -.a))))
|
||||||
(roll args |=([p=flag q=station] ?:(&(?=(^ p) ?=(%s -.p)) p.p q)))
|
(roll args |=([p=flag q=station] ?:(&(?=(^ p) ?=(%s -.p)) p.p q)))
|
||||||
sta
|
sta
|
||||||
|
=. tst (lien args |=(a=flag ?=(%time a)))
|
||||||
|- ^- bowl
|
|- ^- bowl
|
||||||
=< abet:init
|
=< abet:init
|
||||||
|%
|
|%
|
||||||
@ -223,7 +242,7 @@
|
|||||||
++ priv
|
++ priv
|
||||||
|= [now=@da her=@p mes=^mess]
|
|= [now=@da her=@p mes=^mess]
|
||||||
^+ +>
|
^+ +>
|
||||||
(show (rend [her (iden her)] mes "(private) "))
|
(show (rend [her (iden her)] mes "(private) " now))
|
||||||
::
|
::
|
||||||
++ said :: server message
|
++ said :: server message
|
||||||
|= duz=(list zong)
|
|= duz=(list zong)
|
||||||
@ -235,7 +254,7 @@
|
|||||||
?- -.i.duz
|
?- -.i.duz
|
||||||
%mess
|
%mess
|
||||||
?: =(who q.i.duz) +>
|
?: =(who q.i.duz) +>
|
||||||
(show (rend [q.i.duz (iden q.i.duz)] r.i.duz ""))
|
(show (rend [q.i.duz (iden q.i.duz)] r.i.duz "" p.i.duz))
|
||||||
== ==
|
== ==
|
||||||
::
|
::
|
||||||
++ shew |=(tax=(list tank) +>(giz [[%lo tax] giz])) :: print to screen
|
++ shew |=(tax=(list tank) +>(giz [[%lo tax] giz])) :: print to screen
|
||||||
@ -264,7 +283,10 @@
|
|||||||
%who
|
%who
|
||||||
%^ show %rose [", " "" ""]
|
%^ show %rose [", " "" ""]
|
||||||
%+ turn (~(tap by ami))
|
%+ turn (~(tap by ami))
|
||||||
|= p=idad [%leaf (idt p)]
|
|= p=idad
|
||||||
|
:- %leaf
|
||||||
|
%- trip
|
||||||
|
%^ cat 3 %^ cat 3 (scot %p p.p) ' ' q.p
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ vent :: handle event
|
++ vent :: handle event
|
||||||
|
@ -22,6 +22,7 @@ command-line parameters:
|
|||||||
%quiet do not display entrance and exit notices
|
%quiet do not display entrance and exit notices
|
||||||
%leet only display ship names
|
%leet only display ship names
|
||||||
%noob display ship and textual names
|
%noob display ship and textual names
|
||||||
|
%time display timestamps for messages
|
||||||
|
|
||||||
only one of %monitor and %quiet may be specfied. default behavior is %quiet.
|
only one of %monitor and %quiet may be specfied. default behavior is %quiet.
|
||||||
only one of %leet and %noob may be specified. default behavior is %leet.
|
only one of %leet and %noob may be specified. default behavior is %leet.
|
||||||
|
Loading…
Reference in New Issue
Block a user