From ccecc67d74f35b0be41073c2a3ccd237ed955402 Mon Sep 17 00:00:00 2001 From: MiniMeOSc Date: Mon, 21 Mar 2022 22:43:08 +0100 Subject: [PATCH] Fix stream command not working for second or later host in configuration --- gui/src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- 2.34.4