]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/humanizer.go
Raise copyright years
[nncp.git] / src / humanizer.go
index 14b615fbfdcc8369872aed37183d71d72c25b003..78e2fc110feff5c1b0371b4bbd438cdea50dbee1 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy
-Copyright (C) 2016-2019 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2021 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -227,7 +227,7 @@ func (ctx *Ctx) Humanize(s string) string {
                }
                msg = fmt.Sprintf(
                        "Packet %s (%s) (nice %s)",
-                       sds["hash"],
+                       sds["pkt"],
                        size,
                        NicenessFmt(nice),
                )
@@ -254,7 +254,7 @@ func (ctx *Ctx) Humanize(s string) string {
                }
                msg += fmt.Sprintf("%s packets, %s", sds["pkts"], size)
        case "sp-process":
-               msg = fmt.Sprintf("%s has %s (%s): %s", nodeS, sds["hash"], size, rem)
+               msg = fmt.Sprintf("%s has %s (%s): %s", nodeS, sds["pkt"], size, rem)
        case "sp-file":
                switch sds["xx"] {
                case "rx":
@@ -274,7 +274,7 @@ func (ctx *Ctx) Humanize(s string) string {
                }
                msg += fmt.Sprintf(
                        "%s %d%% (%s / %s)",
-                       sds["hash"],
+                       sds["pkt"],
                        100*sizeParsed/fullsize,
                        humanize.IBytes(uint64(sizeParsed)),
                        humanize.IBytes(uint64(fullsize)),
@@ -282,9 +282,9 @@ func (ctx *Ctx) Humanize(s string) string {
        case "sp-done":
                switch sds["xx"] {
                case "rx":
-                       msg = fmt.Sprintf("Packet %s is retreived (%s)", sds["hash"], size)
+                       msg = fmt.Sprintf("Packet %s is retreived (%s)", sds["pkt"], size)
                case "tx":
-                       msg = fmt.Sprintf("Packet %s is sent", sds["hash"])
+                       msg = fmt.Sprintf("Packet %s is sent", sds["pkt"])
                default:
                        return s
                }