ames: document %snub task and /ax/snubbed scry

This commit is contained in:
Tinnus Napbus 2023-04-12 17:57:35 +12:00
parent 8b72f043d2
commit cff36f4400
2 changed files with 45 additions and 0 deletions

View File

@ -123,3 +123,21 @@ A scry with a `%x` `care` and a `path` of `/snd-bones/[ship]/[bone]`, where `[sh
]
]
```
## /snubbed
A scry with a `%x` `care` and a `path` of `/snubbed` will return Ames' current
ship whitelist/blacklist. The type is a `[form=?(%allow %deny) ships=(list
ship)]`, where `form` says whether it's a whitelist or blacklist and `ships`
are the ships on that list.
#### Example
```
> |ames-snub %deny ~wet ~sampel
>=
> .^([form=?(%allow %deny) ships=(list ship)] %ax /=//=/snubbed)
[form=%deny ships=[i=~sampel t=[i=~wet t=~]]]
```

View File

@ -148,6 +148,33 @@ The `ships` field specifies the ships for which debug output is desired.
This `task` returns no `gift`s.
### `%snub`
```hoon
[%snub form=?(%allow %deny) ships=(list ship)]
```
This `task` blacklists/whitelists ships in Ames.
The `form` field specifies whether the given ships should be blacklisted or whitelisted. The `ships` field are the ships to blacklist/whitelist.
The Ames `snub` settings can only have one form at a time: an `%allow` list or
`%deny` list. If an `%allow` form is set, packets from **all ships not on the
list will be blocked**. If a `%deny` form is set, packets from **any ship on
the list will be blocked, and all others allowed**.
{% callout %}
Note: a `%snub` `task` overrides the existing snub list and form entirely,
it does not merely add/remove ships from the existing list.
If you just want to add/remove a ship from an existing blacklist/whitelist,
you'll need to first [scry out the existing snub
settings](/reference/arvo/ames/scry#snubbed), make your changes, and send the
whole modified list and form in a new `%snub` `task`.
{% /callout %}
### `%spew`
```hoon