diff --git a/src/commands.cpp b/src/commands.cpp index 32ee289..18ea89f 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1,6 +1,5 @@ #include "gbp.cpp" #include -#include #include #include #include @@ -232,27 +231,3 @@ void initCommands() vecArgs.emplace("findname", &findName); vecArgs.emplace("copypasta", ©pasta); } - - -////finish this, make it return a string -//use THIS to ping the users, and call it from a separate thread -void pingUsers() -{ - std::ifstream file; - file.open("toPing.txt"); - if (!file) { - file.close(); - return; - } - - std::string line; - std::string username; - int gbpPos; - std::string toPing; - while(getline(file, line)) { - username = line.substr(0, line.find(" ")); - gbpPos = std::stoi(line.substr(line.find(" ") + 1, line.length() - (line.find(" ") + 1))); - toPing = line.substr(line.rfind(" "), line.length() - line.rfind(" ")); - } - -} diff --git a/src/notify.cpp b/src/notify.cpp deleted file mode 100644 index e8568e9..0000000 --- a/src/notify.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include -#include -#include "gbp.cpp" - -void startScanning() -{ - while (1) { - // read from the cached file contianing names to watch, if the gbp their position is > or < what is marked down, Ping the original recpiient that their locatoin has changed and then sleep for an hour, - - } -} - -void pingUsers() -{ - std::ifstream file; - file.open("toPing.txt"); - if (!file) { - file.close(); - return; - } - - std::string line; - std::string username; - int gbpPos; - std::string toPing; - while(getline(file, line)) { - username = line.substr(0, line.find(" ")); - gbpPos = std::stoi(line.substr(line.find(" ") + 1, line.length() - (line.find(" ") + 1))); - toPing = line.substr(line.rfind(" "), line.length() - line.rfind(" ")); - - std::map> gbp = fetchAndReadGBP(); - - if (gbp[gbpPos].second == username) { - std::cout << "chungus" << std::endl; - } else { - - // message - } - } - -}