urbit/main/app/radio/core.hook

86 lines
2.1 KiB
Plaintext
Raw Normal View History

2014-08-01 06:44:49 +04:00
/- mess,user,users,zing,zong
2014-07-03 02:08:02 +04:00
!:
=> |%
++ axle
2014-11-11 22:55:28 +03:00
$% [%0 p=(map path ,[p=(list zong) q=(map ship ,?)])]
2014-07-03 02:08:02 +04:00
==
++ blitz
$% [%zong p=zong]
[%user p=user]
2014-07-03 02:08:02 +04:00
==
++ iron
$% [%zongs p=(list zong)]
2014-08-01 06:44:49 +04:00
[%users p=users]
2014-07-03 02:08:02 +04:00
==
++ gift
$% [%rush blitz]
[%rust iron]
2014-08-01 06:44:49 +04:00
[%mean ares]
2014-07-08 04:32:58 +04:00
[%nice ~]
2014-07-03 02:08:02 +04:00
==
++ move ,[p=bone q=(mold note gift)]
++ note ,~
--
|_ [hid=hide vat=axle]
++ grab
|= sta=path
2014-11-11 22:55:28 +03:00
(fall (~(get by p.vat) sta) *[p=(list zong) q=(map ship ,?)])
::
++ ident
|= you=ship
2014-08-01 06:44:49 +04:00
%- (hard ,@t)
.^(%a (scot %p our.hid) %name (scot %da lat.hid) (scot %p you) ~)
::
2014-07-03 02:08:02 +04:00
++ peer
|= [ost=bone you=ship pax=path]
^- [(list move) _+>]
2014-11-11 22:55:28 +03:00
?~ pax
[[ost %give %mean ~ %radio-bad-path ~]~ +>.$]
=+ ya=(grab t.pax)
?+ -.pax [~ +>.$]
2014-07-03 02:08:02 +04:00
%mensajes
2014-11-11 22:55:28 +03:00
[[ost %give %rust %zongs p.ya]~ +>.$]
2014-07-03 02:08:02 +04:00
%amigos
2014-11-11 22:55:28 +03:00
=. q.ya (~(put by q.ya) you %.y)
:_ +>.$(p.vat (~(put by p.vat) t.pax ya))
:_ (send pax %give %rush %user %in you (ident you))
2014-07-03 02:08:02 +04:00
:* ost %give %rust %users
2014-11-11 22:55:28 +03:00
%+ murn (~(tap by q.ya))
|= [shi=ship liv=?]
?. liv
~
(some [shi (ident shi)])
2014-07-03 02:08:02 +04:00
==
==
::
++ poke-zing
|= [ost=bone you=ship zig=zing]
^- [(list move) _+>]
2014-11-11 22:55:28 +03:00
=+ ya=(grab p.zig)
?. (~(has by q.ya) you)
[[ost %give %mean ~ %no-te-conozco ~]~ +>.$]
=+ zog=`zong`[%mess lat.hid you q.zig]
=. p.vat (~(put by p.vat) p.zig [[zog p.ya] q.ya])
:_ +>.$
:- [ost %give %nice ~]
(send mensajes/p.zig %give %rush %zong zog)
::
++ pull
|= ost=bone
^- [(list move) _+>]
=+ ^- [his=ship pax=path] (~(got by sup.hid) ost)
?. ?=([%mensajes *] pax)
[~ +>.$]
2014-11-25 01:00:13 +03:00
=+ sta=(~(got by p.vat) t.pax)
2014-11-11 22:55:28 +03:00
=. q.sta %+ ~(put by q.sta) his %.n
2014-11-25 01:00:13 +03:00
=. p.vat %+ ~(put by p.vat) t.pax sta
[(send amigos/t.pax %give %rush %user %out his (ident his)) +>.$]
2014-07-03 02:08:02 +04:00
::
++ send
|= [pax=path msg=(mold note gift)]
^- (list move)
:: ~& [%radi-sub pus.hid]
%+ turn (~(tap in (~(get ju pus.hid) pax)))
|=(ost=bone [ost msg])
2014-07-03 02:08:02 +04:00
--