What is IpToCountry?
In short, as the name says, it can resolve a country from an ip address, it also resolves a hostname. IpToCountry is meant mainly to be just a shared component between many other mods, for example imagine a scoreboard showing a small country flag near each player's nick(pss, it is quite easy, I've made a special texture package with all the country flags), so don't expect much black magic from IpToCountry itself. But to not make you sad I've also made a little addon which will show players' country names after doing a mutate command, for admins there is a similiar command showing hostnames, this addon is enabled by default but you can disable it in the config.

How does it work?
To your knowledge, resolving a country from an ip requires quite a big database and implementing it in unrealscript would be very hard, thus IpToCountry connects to a php script which is located on a http server, this php script uses a mysql database generated from ip-to-country.csv file kindly distributed by http://ip-to-country.webhosting.info - direct link is provided in QueryServer instructions. If you wanna know how the queues, querying stuff exactly works just "Use the source Luke!".

How Do I Set My Server Up To Use IpToCountry?
Add the following line to the [Engine.GameEngine] section of UnrealTournament.ini: ServerActors=IpToCountry.LinkActor

After the first run, the IpToCountry.ini should be created. Edit it, there are 3 variables you can change:
bAddon=True - whether to use the Addon - read NOT FOR ADMINS
PrimaryQueryServer - leave these two unless you know what you're doing
SecondaryQueryServer

Test the IpToCountry server
Simply going to http://iptocountry.ut-files.com/ should display your current IP address and a button to test the server. If you get a response that shows the timeip:hostname:country:initial:shortinitial then it's working. If it times out then something is wrong. Please let us know on our forums.

To get it to work with this server and the one hosted by unrealadmin.org



For more up-to-date information as well as how often the database is updated, please visit this link: unrealadmin thread