Merge pull request #176 from Arkshine/fix/keep-geop_country-bcompat
Keep geoip_country backward compatible after #99
This commit is contained in:
commit
dfbc74dc5f
|
@ -106,7 +106,13 @@ static cell AMX_NATIVE_CALL amx_geoip_country(AMX *amx, cell *params)
|
|||
int length;
|
||||
char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length));
|
||||
|
||||
const char *path[] = { "country", "names", getLang(params[4]), NULL };
|
||||
int id = -1;
|
||||
if (*params / sizeof(cell) >= 4)
|
||||
{
|
||||
id = params[4];
|
||||
}
|
||||
|
||||
const char *path[] = { "country", "names", getLang(id), NULL };
|
||||
const char *country = lookupString(ip, path, &length);
|
||||
|
||||
if (!country)
|
||||
|
|
Loading…
Reference in New Issue
Block a user