From 619b42e1bbedac406bd3fdb9178fe3e5c732e415 Mon Sep 17 00:00:00 2001 From: scatterflower Date: Wed, 2 Sep 2020 08:51:14 -0500 Subject: [PATCH] fix up all config file paths --- src/aoclient.cpp | 7 ++----- src/server.cpp | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/aoclient.cpp b/src/aoclient.cpp index a7cb36b..08522a3 100644 --- a/src/aoclient.cpp +++ b/src/aoclient.cpp @@ -76,7 +76,7 @@ void AOClient::handlePacket(AOPacket packet) sendPacket("ID", {"271828", "akashi", QCoreApplication::applicationVersion()}); } else if (packet.header == "ID") { - QSettings config("config.ini", QSettings::IniFormat); + QSettings config("config/config.ini", QSettings::IniFormat); config.beginGroup("Options"); QString max_players = config.value("max_players").toString(); config.endGroup(); @@ -114,10 +114,7 @@ void AOClient::handlePacket(AOPacket packet) fullArup(); // Give client all the area data arup(ARUPType::PLAYER_COUNT, true); // Tell everyone there is a new player - QSettings areas_ini("areas.ini", QSettings::IniFormat); - QStringList areas = areas_ini.childGroups(); - - sendPacket("FA", areas); + sendPacket("FA", server->area_names); sendPacket("OPPASS", {"DEADBEEF"}); sendPacket("DONE"); } diff --git a/src/server.cpp b/src/server.cpp index 127d9b3..59b663f 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -60,7 +60,7 @@ void Server::start() music_list.insert(0, "Music"); // TODO: add verification that this exists - QSettings areas_ini("areas.ini", QSettings::IniFormat); + QSettings areas_ini("config/areas.ini", QSettings::IniFormat); area_names = areas_ini.childGroups(); for (int i = 0; i < area_names.length(); i++) { QString area_name = area_names[i];