diff --git a/gui/src/main.cpp b/gui/src/main.cpp index 010e744..a96f007 100644 --- a/gui/src/main.cpp +++ b/gui/src/main.cpp @@ -129,15 +129,21 @@ int real_main(int argc, char *argv[]) { if(args.length() < 3) parser.showHelp(1); + + bool found = false; for(const auto &temphost : settings.GetRegisteredHosts()) { if(temphost.GetServerNickname() == args[1]) { + found = true; morning = temphost.GetRPKey(); regist_key = temphost.GetRPRegistKey(); target = temphost.GetTarget(); break; } + } + if(!found) + { printf("No configuration found for '%s'\n", args[1].toLocal8Bit().constData()); return 1; }