From: Sergey Matveev Date: Sat, 3 Jul 2021 19:25:27 +0000 (+0300) Subject: nncp-rm -node aliases X-Git-Tag: v7.1.0^2 X-Git-Url: http://www.git.cypherpunks.ru/?p=nncp.git;a=commitdiff_plain;h=d0647df298815e8b948838760ea8ac1ad00cb6c5 nncp-rm -node aliases --- diff --git a/doc/news.ru.texi b/doc/news.ru.texi index 1675458..49cecae 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -24,6 +24,9 @@ У @command{nncp-check} команды появилась @option{-cycle} опция, вводящая проверку в бесконечный цикл. +@item +У @command{nncp-rm} команды можно указывать alias-ы имён нод. + @item @command{nncp-pkt} может парсить @file{.hdr} файлы. diff --git a/doc/news.texi b/doc/news.texi index b99a29d..ebfd8c7 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -25,6 +25,9 @@ all the nodes at once. @option{-cycle} option appeared in @command{nncp-check} command, looping the check in infinite cycle. +@item +@command{nncp-rm} command can take node alias name. + @item @command{nncp-pkt} can parse @file{.hdr} files. diff --git a/src/cmd/nncp-rm/main.go b/src/cmd/nncp-rm/main.go index aa64228..39cd0c6 100644 --- a/src/cmd/nncp-rm/main.go +++ b/src/cmd/nncp-rm/main.go @@ -175,10 +175,11 @@ func main() { os.Exit(1) } } else { - nodeId, err = nncp.NodeIdFromString(*nodeRaw) + node, err := ctx.FindNode(*nodeRaw) if err != nil { log.Fatalln("Invalid -node specified:", err) } + nodeId = node.Id } for _, node := range ctx.Neigh { if nodeId != nil && node.Id != nodeId {