Fix stream command not working for second or later host in configuration

This commit is contained in:
MiniMeOSc 2022-03-21 22:43:08 +01:00 committed by Florian Märkl
parent dcd2e6af4a
commit ccecc67d74

View file

@ -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;
}