mirror of
https://github.com/urbit/developers.urbit.org.git
synced 2024-08-17 01:30:31 +03:00
Merge pull request #336 from urbit/i/332/ames-snub-docs
ames: document %snub task and /ax/snubbed scry
This commit is contained in:
commit
3891ed6014
@ -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=~]]]
|
||||
```
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user