feat: add accessKey and keyId to config
This commit is contained in:
@@ -147,6 +147,8 @@ void Spoofer::loadConfig()
|
||||
configJson.value("spoofCharacterOwnership", _config.spoofCharacterOwnership);
|
||||
_config.spoofInventory = configJson.value("spoofInventory", _config.spoofInventory);
|
||||
_config.spoofCustomization = configJson.value("spoofCustomization", _config.spoofCustomization);
|
||||
_config.accessKey = configJson.value("accessKey", _config.accessKey);
|
||||
_config.keyId = configJson.value("keyId", _config.keyId);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -158,13 +160,14 @@ void Spoofer::loadConfig()
|
||||
Log::info("config.json not found, using default settings");
|
||||
json defaultConfig = {{"spoofCharacterOwnership", _config.spoofCharacterOwnership},
|
||||
{"spoofInventory", _config.spoofInventory},
|
||||
{"spoofCustomization", _config.spoofCustomization}};
|
||||
{"spoofCustomization", _config.spoofCustomization},
|
||||
{"accessKey", _config.accessKey}, {"keyId", _config.keyId}};
|
||||
std::ofstream out(configPath);
|
||||
out << defaultConfig.dump(4);
|
||||
}
|
||||
|
||||
Log::info("Loaded config: Ownership={}, Inventory={}, Customization={}", _config.spoofCharacterOwnership,
|
||||
_config.spoofInventory, _config.spoofCustomization);
|
||||
Log::info("Loaded config: Ownership={}, Inventory={}, Customization={}, AccessKey={}, keyId={}",
|
||||
_config.spoofCharacterOwnership, _config.spoofInventory, _config.spoofCustomization, _config.accessKey, _config.keyId);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -418,8 +421,7 @@ void Spoofer::onGetAllClient(std::string& body)
|
||||
{
|
||||
if (charName == "K25") continue;
|
||||
|
||||
if (std::find(jsonList.begin(), jsonList.end(), charName) == jsonList.end())
|
||||
jsonList.push_back(charName);
|
||||
if (std::find(jsonList.begin(), jsonList.end(), charName) == jsonList.end()) jsonList.push_back(charName);
|
||||
}
|
||||
|
||||
body = doc.dump();
|
||||
|
||||
Reference in New Issue
Block a user