urbit/base/app/ye/core.hook
2015-04-29 18:48:45 -04:00

43 lines
1.0 KiB
Plaintext

:: Ye broadcast
::
:::: /hook/gate/ye/bin
::
/+ sh-utils
::
::::
::
|%
++ sign ::
$% $: %a ::
$% [%went p=ship q=cape] ::
== == == ::
++ flog :: sent to %dill
$% [%crud p=@tas q=(list tank)] ::
[%text p=tape] ::
== ::
--
!:
::::
::
|_ [hid=hide ~]
++ peer ,_`.
++ poke--args
%+ gate-bang
|= [tex=tape ~]
=+ mez=(crip "{<our.hid>}: {tex}")
[%a %want [our.hid (sein our.hid)] /q/ye mez]
(add-nice ,_`.)
::
++ poke-txt
%+ gate-bang |=(cor=@t [%d %flog `flog`[%text "> {(trip cor)}"]])
(add-nice ,_`.)
::
++ pour
|= [ost=bone pax=path sih=sign]
?> ?=([%bang ~] pax)
%. +<
=+ ack=?+(q.sih "failed" %good "recieved")
(add-exit (print +>.$ "ye {ack}"))
::
--