]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cypherpunks.ru/nncp/humanizer.go
Remote command execution
[nncp.git] / src / cypherpunks.ru / nncp / humanizer.go
index 4a79fcd9e6facae990d490bdd55ba8e761c1d3d5..cea9546b150d619f9022bb415fd686949f3a390b 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy
-Copyright (C) 2016-2017 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2018 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
@@ -84,10 +84,10 @@ func (ctx *Ctx) Humanize(s string) string {
                                "File request from %s:%s to %s: %s",
                                nodeS, sds["src"], sds["dst"], rem,
                        )
-               case "mail":
+               case "exec":
                        msg = fmt.Sprintf(
-                               "Mail to %s@%s (%s): %s",
-                               nodeS, strings.Replace(sds["dst"], " ", ",", -1), size, rem,
+                               "Exec to %s@%s (%s): %s",
+                               nodeS, sds["dst"], size, rem,
                        )
                case "trns":
                        msg = fmt.Sprintf(
@@ -102,10 +102,10 @@ func (ctx *Ctx) Humanize(s string) string {
                }
        case "rx":
                switch sds["type"] {
-               case "mail":
+               case "exec":
                        msg = fmt.Sprintf(
-                               "Got mail from %s to %s (%s)",
-                               nodeS, strings.Replace(sds["dst"], " ", ",", -1), size,
+                               "Got exec from %s to %s (%s)",
+                               nodeS, sds["dst"], size,
                        )
                case "file":
                        msg = fmt.Sprintf("Got file %s (%s) from %s", sds["dst"], size, nodeS)