From 4f1c68ddeda50c5ed971650e4fc9981d019a2c72 Mon Sep 17 00:00:00 2001 From: "login (tilde.temm)" Date: Fri, 21 Feb 2020 23:24:10 -0500 Subject: Added silentsend with message case to pcoin.cpp I don't know how I missed this, because I remember coming across this deficiency before. I had missed a case, where silentsend is requested but with a message. Previously, it would fail without any message to stdout or stderr (only a return code). Now, silentsend with a message works even on pcoin.cpp (tcoin.cpp already had this change). --- pcoin.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pcoin.cpp b/pcoin.cpp index e9f563b..61a7945 100644 --- a/pcoin.cpp +++ b/pcoin.cpp @@ -1934,6 +1934,21 @@ int main(int argc, char *argv[]) else send_message(get_username().c_str(), argv[3], "", strtol100(argv[2]), "silent"); } + if(argc==5) //custom message included + { + int return_value; + if(is_number(argv[2])) + return_value = send(get_username().c_str(), argv[3], strtol100(argv[2]), base_amount, "silent"); + else + return_value = send(get_username().c_str(), argv[2], strtol100(argv[3]), base_amount, "silent"); + if(!return_value) //send was successful + { + if(is_number(argv[2])) + send_message(get_username().c_str(), argv[3], argv[4], strtol100(argv[2]), "silent"); + else + send_message(get_username().c_str(), argv[2], argv[4], strtol100(argv[3]), "silent"); + } + } else return ERR_SILENTSEND; } -- cgit 1.4.1-2-gfad0