GreyHound 2010

This is a Server Plugin for Tribes 1, original version, no 1.40 stuff

Those 2 files should be present:
<Tribes Dir>/Plugins/GeoIp/GeoLiteCity.dat
<Tribes Dir>/Plugins/GeoIp/GeoIPASNum.dat

You can get those 2 files here:
http://www.maxmind.com/app/geolitecity
http://geolite.maxmind.com/download/geoip/database/asnum/


Simple example:

function GeoIP::OnConnect(%clientId)
{	
	%name	= Client::GetName(%clientId);
	%ip		= Client::getTransportAddress(%clientId);
	%ip		= MySql::ParseIP(%ip);
	
	GeoIp::Lookup(%ip);
	GeoIP::print();
}

function GeoIP::print()
{
	echo($GeoIP[country]);
	echo($GeoIP[region]);
	echo($GeoIP[regionname]);
	echo($GeoIP[city]);
	echo($GeoIP[latitude]);
	echo($GeoIP[longitude]);
	echo($GeoIP[metrocode]);
	echo($GeoIP[areacode]);
	echo($GeoIP[timezone]);
	echo($GeoIP[1]);
	echo($GeoIP[2]);
	echo($GeoIP[ASN]);
}


[/code]