add some output when searching ips

master
Dominic Reich 2 years ago
parent fd236813fa
commit c38dfbbcdb

@ -613,18 +613,27 @@ inline bool findIpInFile(const char *filename, string ip)
ifstream File(filename); ifstream File(filename);
if(!File.is_open()) if(!File.is_open())
{ {
cout << "error while opening file" << endl;
return false; return false;
} }
string line = ""; string line = "";
int iFound = 0;
while(getline(File, line)) while(getline(File, line))
{ {
if(boost::iequals(ip, line) == true) if(boost::iequals(ip, line) == true)
{ {
//cout << ip << " found in " << filename << "!" << endl; //cout << ip << " found in " << filename << endl;
cout << "Found." << endl;
iFound = 1;
return true; return true;
} }
} }
if(iFound == 0)
{
cout << "Not found." << endl;
//cout << ip << " not found in " << filename << endl;
}
File.close(); File.close();
return false; return false;
} }

@ -7,7 +7,7 @@ namespace Version{
static const char STATUS[] = "Release Candidate [chronos-vs]"; static const char STATUS[] = "Release Candidate [chronos-vs]";
//Miscellaneous Version Types //Miscellaneous Version Types
static const char VERSION_STRING [] = "0.5"; static const char VERSION_STRING [] = "0.5.2";
//Copyright line usable in the program //Copyright line usable in the program
static const char COPYRIGHT [] = "Copyright ©2015-2022 Dominic Reich\n"; static const char COPYRIGHT [] = "Copyright ©2015-2022 Dominic Reich\n";

Loading…
Cancel
Save