Check if getting IP worked

This commit is contained in:
Jackzie 2024-11-26 16:33:16 -06:00
parent 7661a95f0e
commit 19d2d6d334
2 changed files with 4 additions and 3 deletions

Binary file not shown.

View file

@ -195,9 +195,10 @@ void SetupUserInDB(int client) {
char country[128];
char region[128];
char ip[64];
GetClientIP(client, ip, sizeof(ip));
GeoipCountry(ip, country, sizeof(country));
GeoipRegion(ip, region, sizeof(region));
if(GetClientIP(client, ip, sizeof(ip))) {
GeoipCountry(ip, country, sizeof(country));
GeoipRegion(ip, region, sizeof(region));
}
int time = GetTime();
char query[512];