Cleanup some code from previous commits

This commit is contained in:
Arkshine 2015-02-08 11:23:54 +01:00
parent 553663c952
commit e95d5ed43c
2 changed files with 3 additions and 7 deletions

View File

@ -124,13 +124,7 @@ static cell AMX_NATIVE_CALL amx_geoip_country_ex(AMX *amx, cell *params)
int length;
char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length));
int id = -1;
if (*params / sizeof(cell) >= 4)
{
id = params[4];
}
const char *path[] = { "country", "names", getLang(id), NULL };
const char *path[] = { "country", "names", getLang(params[4]), NULL };
const char *country = lookupString(ip, path, &length);
return MF_SetAmxStringUTF8Char(amx, params[2], country ? country : "", length, params[3] + 1);

View File

@ -167,7 +167,9 @@ const char *lookupString(const char *ip, const char **path, int *length)
if (!lookupByIp(ip, path, &result))
{
if (length)
{
*length = 0;
}
return NULL;
}