From c544f574b359cad5068e59554d67ffc6ff6e0276 Mon Sep 17 00:00:00 2001 From: Substitute Date: Fri, 12 Feb 2021 12:46:36 -0500 Subject: [PATCH] Finish menu + fix operand bug --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 488e1d4..9a4c8ad 100644 --- a/main.cpp +++ b/main.cpp @@ -34,7 +34,7 @@ auto onClientMessaged(networked& client, std::string& message) int operation = std::stoi(message); sscout << "OPCode is " << operation << ".\n"; if (math::is_between<0,7>(operation)) - client.send_message(net::system(commands[operation])); + client.send_message(net::system(commands[operation-1])); else badOperand(); }catch(std::invalid_argument& invalid_number) { badOperand(); } @@ -58,7 +58,7 @@ auto execute_as_client(std::string ipaddress, std::uint16_t port) { while(true) { - auto operation = get_input("Pick Command\n\t1. Date\n\t2. \n\t3. \n\t4. Netstat\n\t5.\n\t6.\n\t7. Exit\n:>", "Invalid Selection", math::is_between<0, 8>); + auto operation = get_input("Pick Command\n\t1. Date\n\t2. Uptime\n\t3. Memory Use\n\t4. Netstat\n\t5. Current Users\n\t6. Running Processes\n\t7. Exit\n:>", "Invalid Selection", math::is_between<0, 8>); if (operation == 7) break; auto num_clients = get_input("Enter number of clients. (1-25): ", "Invalid Amount", math::is_between<0, 26>);