poke-manage save ship in office

This commit is contained in:
Anton Dyudin 2016-04-14 16:52:37 -07:00
parent 46e9ebc827
commit d0418c1f20
3 changed files with 37 additions and 0 deletions

View File

@ -140,6 +140,7 @@
++ poke-womb-claim (wrap poke-claim):from-womb
++ poke-womb-rekey (wrap poke-rekey):from-womb
++ poke-womb-report (wrap poke-report):from-womb
++ poke-womb-manage (wrap poke-manage):from-womb
++ poke-womb-release (wrap poke-release):from-womb
++ poke-womb-reinvite (wrap poke-reinvite):from-womb
++ poke-write-sec-atom (wrap poke-sec-atom):from-write

13
gen/hood/manage.hoon Normal file
View File

@ -0,0 +1,13 @@
::
:::: /hoon/manage/hood/gen
::
/? 310
::
::::
!:
:- %say
|= $: {now/@da eny/@uvI bec/beak}
{who/(list @p) $~}
==
:- %womb-manage
who

View File

@ -433,6 +433,29 @@
$invite (peek-x-invite +.tyl)
==
::
++ poke-manage :: add to property
|= a/(list ship)
=< abet
?> |(=(our src) =([~ src] boss)) :: privileged
|-
?~ a .
?+ (clan i.a) ~|(bad-size+(clan i.a) !!)
$duke
?. (~(has by stars.office) i.a)
$(a t.a, stars.office (~(put by stars.office) i.a ~))
~|(already-managing+i.a !!)
::
$king
?. (~(has by planets.office) i.a)
$(a t.a, planets.office (~(put by planets.office) i.a ~))
~|(already-managing+i.a !!)
::
$czar
?. (~(has by galaxies.office) i.a)
$(a t.a, galaxies.office (~(put by galaxies.office) i.a ~))
~|(already-managing+i.a !!)
==
::
++ email
|= {adr/mail msg/tape} ^+ +>
:: (emit %poke /invite %gmail %gmail-send adr msg)