|
@@ -78,7 +78,7 @@ void UserIoMan::printMessage(std::string msg, OutMsgType type) {
|
|
|
|
|
|
void UserIoMan::printWelcomeMessage() {
|
|
|
std::cout << std::endl
|
|
|
- << "Please connect to a server via \"connect <ip> <port>\"," << std::endl
|
|
|
+ << "Please connect to a server via \"connect <ip> <port>\", then" << std::endl
|
|
|
<< "login by entering \"login <username> <password>\"" << std::endl
|
|
|
<< "or sign up and log in with \"signup <username> <password>\"." << std::endl
|
|
|
<< std::endl;
|
|
@@ -90,7 +90,7 @@ void UserIoMan::printJson(Json::Value root) {
|
|
|
map<string, void (UserIoMan::*)(Json::Value)>::iterator it = printmap.find(root["command"].asString());
|
|
|
if (it == printmap.end()) {
|
|
|
// this should never happen outside of development
|
|
|
- printMessage(string(__PRETTY_FUNCTION__) + " unknown command \"" + root["command"].asString() + "\".\nensure code is implemented.", debug);
|
|
|
+ printMessage(string(__PRETTY_FUNCTION__) + " unknown command \"" + root["command"].asString() + "\".\nEnsure code is implemented.", debug);
|
|
|
return;
|
|
|
}
|
|
|
(this->*(printmap[root["command"].asString()]))(root);
|
|
@@ -238,7 +238,7 @@ void UserIoMan::printExtendedlist(Json::Value root) {
|
|
|
} else if (encrypted == "undecryptable") {
|
|
|
decryptable = "\033[31mno\033[0m "; // "no" in red
|
|
|
} else if (encrypted == "unknown") {
|
|
|
- decryptable = "unknown "; // "no" in red
|
|
|
+ decryptable = "unknown ";
|
|
|
} else {
|
|
|
decryptable = "plaintext ";
|
|
|
}
|
|
@@ -258,8 +258,8 @@ void UserIoMan::printExtendedlist(Json::Value root) {
|
|
|
|
|
|
void UserIoMan::printVersion(Json::Value root) {
|
|
|
if (!root["accept"].asBool()) {
|
|
|
- std::cout << "Version check failed. Server reports " << root["serverversion"].asString() << " but client is " << root["clientversion"].asString()
|
|
|
- << std::endl;
|
|
|
+ std::cout << "Version check failed. Server reports version " << root["serverversion"].asString() << " but client is "
|
|
|
+ << root["clientversion"].asString() << std::endl;
|
|
|
} else
|
|
|
std::cout << "Version check ok." << std::endl;
|
|
|
}
|
|
@@ -293,9 +293,9 @@ void UserIoMan::printListdata(Json::Value root) {}
|
|
|
|
|
|
void UserIoMan::printHead(Json::Value root) {
|
|
|
if (!root["accept"].asBool())
|
|
|
- std::cout << "Request of the first four bytes failed. " << root["error"].asString() << std::endl;
|
|
|
+ std::cout << "Request of the first few bytes failed. " << root["error"].asString() << std::endl;
|
|
|
else
|
|
|
- std::cout << "First four bytes of file " << root["file"].asString() << " are: " << root["data"].asString() << std::endl;
|
|
|
+ std::cout << "First few bytes of file " << root["file"].asString() << " are: " << root["data"].asString() << std::endl;
|
|
|
}
|
|
|
|
|
|
void UserIoMan::printDeletefile(Json::Value root) {
|
|
@@ -323,14 +323,14 @@ void UserIoMan::printQueue(Json::Value root) {
|
|
|
if (!root["accept"].asBool())
|
|
|
std::cout << "Queueing of file " << root["file"] << " failed. " << root["error"].asString() << std::endl;
|
|
|
else
|
|
|
- std::cout << "File " << root["file"] << " queued succesfully" << std::endl;
|
|
|
+ std::cout << "File " << root["file"] << " queued succesfully." << std::endl;
|
|
|
}
|
|
|
|
|
|
void UserIoMan::printDequeue(Json::Value root) {
|
|
|
if (!root["accept"].asBool())
|
|
|
std::cout << "Dequeueing of file " << root["file"] << " failed. " << root["error"].asString() << std::endl;
|
|
|
else
|
|
|
- std::cout << "File " << root["file"] << " dequeued succesfully" << std::endl;
|
|
|
+ std::cout << "File " << root["file"] << " dequeued succesfully." << std::endl;
|
|
|
}
|
|
|
|
|
|
void UserIoMan::printNotifications(Json::Value root) {
|