From 51b511be4c584ee4e5222bd3c4f4e08f36519082 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 13 Apr 2018 18:45:10 +0100 Subject: simplewallet: add version command --- src/simplewallet/simplewallet.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/simplewallet/simplewallet.cpp') diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 33615ffe2..f5a075f54 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -62,6 +62,7 @@ #include "ringct/rctSigs.h" #include "multisig/multisig.h" #include "wallet/wallet_args.h" +#include "version.h" #include #ifdef WIN32 @@ -1584,6 +1585,12 @@ bool simple_wallet::save_known_rings(const std::vector &args) return true; } +bool simple_wallet::version(const std::vector &args) +{ + message_writer() << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")"; + return true; +} + bool simple_wallet::set_always_confirm_transfers(const std::vector &args/* = std::vector()*/) { const auto pwd_container = get_and_verify_password(); @@ -2335,6 +2342,10 @@ simple_wallet::simple_wallet() boost::bind(&simple_wallet::blackballed, this, _1), tr("blackballed "), tr("Checks whether an output is blackballed")); + m_cmd_binder.set_handler("version", + boost::bind(&simple_wallet::version, this, _1), + tr("version"), + tr("Returns version information")); m_cmd_binder.set_handler("help", boost::bind(&simple_wallet::help, this, _1), tr("help []"), -- cgit v1.2.3