Don't run this plugin! I have spotted at least two major errors:
Code:
new playerip[17], getcountry[45], country[32][45]
public client_connect(id)
{
if (!(get_cvar_num("amx_showcountry")))
{
return PLUGIN_CONTINUE
}
get_user_ip(id, playerip, 16, 1)
geoip_country(playerip,getcountry)
country[id] = getcountry
return PLUGIN_CONTINUE
}
Can you spot them?
Answers:
* Define country as country[33]* at least. You use id to index it, and an index of 32 would fall outside a 32 sized array (indeces from 0 to 31)
* Max length of country is 45 chars, according to geoip.inc. Therefor you should supply a 46-sized string. getcountry should therefor be getcountry[46]. country should also be country[33][46]. (getcountry is really unnecessary)
I am moving this plugin to trash because these are critical errors. Repost plugin when you've fixed the problems.