最終更新 1 month ago

nuno revised this gist 1 month ago. Go to revision

1 file changed, 20 insertions

gistfile1.txt(file created)

@@ -0,0 +1,20 @@
1 + function cmd::inspect::_blocks_info() {
2 + local name="${1:-}"
3 + block::has_file "$name" || return 0
4 +
5 + cmd::inspect::_section "Peer Blocks"
6 +
7 + local blocked_direct
8 + blocked_direct=$(block::is_blocked_direct "$name")
9 + [[ "$blocked_direct" == "true" ]] && \
10 + printf " \033[1;31m🚫\033[0m blocked directly\n"
11 +
12 + local blocked_groups
13 + blocked_groups=$(block::get_groups "$name")
14 + [[ -n "$blocked_groups" ]] && \
15 + printf " \033[1;31m🚫\033[0m blocked by groups: %s\n" "$blocked_groups"
16 +
17 + block::format_rules "$name"
18 +
19 + return 0
20 + }
Newer Older