BanSystem: use automatic JSON type classification

New feature as of commit 138600a3a6dafeae3d441e6a3c74b865ea88f1d3.
This commit is contained in:
Kawe Mazidjatari 2024-11-29 14:51:30 +01:00
parent 163f38c87d
commit 8237f2b1f3

View File

@ -51,7 +51,7 @@ void CBanSystem::LoadList(void)
int nTotalBans = 0;
if (!JSON_GetValue(document, "totalBans", JSONFieldType_e::kSint32, nTotalBans))
if (!JSON_GetValue(document, "totalBans", nTotalBans))
{
return;
}
@ -69,8 +69,8 @@ void CBanSystem::LoadList(void)
const char* ipAddress = nullptr;
NucleusID_t nucleusId = NULL;
if (JSON_GetValue(entry, "ipAddress", JSONFieldType_e::kString, ipAddress) &&
JSON_GetValue(entry, "nucleusId", JSONFieldType_e::kUint64, nucleusId))
if (JSON_GetValue(entry, "ipAddress", ipAddress) &&
JSON_GetValue(entry, "nucleusId", nucleusId))
{
Banned_t banned;