]> Cypherpunks.ru repositories - nncp.git/commitdiff
nncp-rm -node aliases
authorSergey Matveev <stargrave@stargrave.org>
Sat, 3 Jul 2021 19:25:27 +0000 (22:25 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 4 Jul 2021 17:11:24 +0000 (20:11 +0300)
doc/news.ru.texi
doc/news.texi
src/cmd/nncp-rm/main.go

index 1675458604ae5870ff57d2b038c569ac6185d3d1..49cecae57b2947e4dbd08b7636969cd7af264f48 100644 (file)
@@ -24,6 +24,9 @@
 У @command{nncp-check} команды появилась @option{-cycle} опция, вводящая
 проверку в бесконечный цикл.
 
+@item
+У @command{nncp-rm} команды можно указывать alias-ы имён нод.
+
 @item
 @command{nncp-pkt} может парсить @file{.hdr} файлы.
 
index b99a29d7c5157a9c131ddee308a0b6a9d6d089a3..ebfd8c7902429bfaca2177cbd3f8ec0c7796704d 100644 (file)
@@ -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.
 
index aa642288c69a77f09a659ae7c13cfde808150c67..39cd0c644e5171c5e0b0af37e1721f460ec74088 100644 (file)
@@ -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 {