mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
BanSystem: use automatic JSON type classification
New feature as of commit 138600a3a6dafeae3d441e6a3c74b865ea88f1d3.
This commit is contained in:
parent
163f38c87d
commit
8237f2b1f3
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user