You are an unregistered user, you can register here
Navigation

Information

Site

Donations
If you wish to make a donation you can by clicking the image below.


 
Go Back   The Unreal Admins Page > Forums > Front Page > Downloads > Unreal Tournament > Addons & Mutators

Reply
Thread Tools Display Modes
  #1  
Unread 19th May, 2010, 06:16 PM
Matthew Matthew is offline
Holy Shit!!
 
Join Date: Dec 2004
Posts: 2,382
Default IpToCountry

IpToCountry 1.6 for Unreal Tournament '99

Initial to v1.2 by [es]Rush
v1.6 by Matthew 'MSuLL' Sullivan

Release Date: May 21, 2010
Distributed under the terms of OpenUnrealMod license - see LICENSE.txt for details


>> Download Here <<
(also mirrored at UT-Files)

IF UPGRADING (IMPORTANT!)
-------
If you are upgrading from an old version, please see the section 'UPGRADING'
in the readme file. There have been a few important changes you need to be aware of!


CHANGELOG
-------
1.6: -Workaround to prevent crashing, improve stability and efficiency.
-Trying to switch between query servers no longer fails
-Re-added DNS resolution. IP cached in the config, if it changes the mod will re-resolve.
-Increased number of query servers to 4.


1.2: -Added a small clientside package to identify AOL's country. Will work for USA/GB/DE players.
-Added ErrorLimit variable.
-Removed dependency on the DNS resolving system in UnrealEngine which seemed to be crashing the servers.
Now all host based query servers have to specify an IP.

1.1: -Fixed the texture package, now it is CountryFlags2, this one should be perfect.
-Fixed accessed nones in the Addon part while playing on the server with bots.

1.0: -First version

SPECIAL NOTE
-------
Starting at version 1.6, I (MSuLL) will be trying to support this mod through updates and bugfixes, as Rush
has since moved on from UT and Unreal coding. Rush created the initial versions and did an excellent job.
Most of us (coders) didn't even know such magic was possible until this mod was created and refined.
To both Rush and AnthraX: thank you so very much for your contributions to this mod, and to the UT
community in general. We, the players and admins of UT, deeply appreciate it and thank you for your efforts!

WHAT IS IT FOR?
-------
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
recent versions of SmartCTF, etc. 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 web server. This PHP script uses a database kindly distributed by www.maxmind.com
If you want to know how the querying stuff exactly works just "Use the source Luke!"

AOL is quite troublesome. AOL has all its IP ranges registered in the USA and thus it doesn't
make identification easy. Fortunately Rush found a way to go around the problem.
Three major countries where AOL is very popular are: USA, Great Britain and Germany. All those three have
different timezones, so Rush just had to get a player's time and compare it to GMT. The idea maybe was Rush's
but Cratos was the first to implement it in LeagueAS, Rush got some code from him so big thanks, mate.

WHO USES IT?
-------
At the time of writing this readme the following mods/mutators make use of IpToCountry (that I know of...):
-SuperWebAdmin 0.97
-LeagueAS140
-SmartCTF_4D (and up)
-BTPlusPlusv097
-Hostname Ban
-Nexgen

A NOTE ON THE HTTPCLIENT CLASS (FOR DEVS ONLY)
-------
UT's implementation of a strong, stable HTTP Client wasn't much of a success. Thankfully Rush and
AnthraX took some time and made great progress on a UScript-based solution for the original
builds of IpToCountry. Problem is: if both query servers went down, or the internet stopped working for
just a little while, the entire UT server process would often die. In September 2008 I
(MSuLL) began working on a mod that would depend on strong HTTP communications, which became the mod
'Universal Unreal'. I used Rush's IpToCountry HTTP Client implentation as a base, then went about refining
it and making it more stable and efficient.

One big issue with the old client was that everything was being performed from the HTTP Client class,
and that class was spawned as a ServerActor at startup. When something screws up, the HTTP Client class,
which is based off of UBrowserHTTPClient, can't re-bind a port properly. The solution is to kill the
HTTP Client class and start another instance upon a critical bind error.

For v1.6(+future editions) of IpToCountry, I've ported (or un-ported?) my HTTP Client implementation
back into the mod where it all began. I've separated it into three main parts. The LinkActor class
does error handling and general data management. The HTTPClient class does the grunt work and can be
killed off (and then restarted) when critical errors are encountered. The third class is the Addon
class, nothing major has changed in this class though.

I'd encourage developers to make use of this improved HTTP Client implementation in your own
mods. Even though this game is 11 years old, there's still time for cool new stuff to be built
The class is very modular and shouldn't be too hard to understand / modify / etc. Feel free to
ask for help in the UnrealAdmin.org forum, and I'd be glad to help.

THANKS TO
-------
AnthraX - for overall help, consultations and helping UT'99 community so much, thanks mate! Also thanks for updating the query server
teleport*bR - thanks for the great help in putting the texture package to one, thanks also for testing
Cratos - for supporting IpToCountry in LeagueAS and giving me some code to identify AOL's timezone
UnrealAdmin - for keeping UT alive
Attached Files
File Type: zip IpToCountry-1.0.zip (696.6 KB, 21 views)
File Type: zip IpToCountry-1.1.zip (92.2 KB, 18 views)
File Type: zip IpToCountry-1.2.zip (103.5 KB, 18 views)
File Type: zip IpToCountry-1.2-v2.zip (749.3 KB, 18 views)
File Type: zip IpToCountry-1.2-v3.zip (716.6 KB, 23 views)
File Type: zip ipToCountry-1.6.zip (623.1 KB, 243 views)

Last edited by Matthew : 12th December, 2013 at 09:35 PM.
Reply With Quote
  #2  
Unread 19th May, 2010, 10:13 PM
3apa3a 3apa3a is offline
Forum Newcomer
 
Join Date: Nov 2008
Posts: 8
Default

should the i in "ipToCountry" be lowercase or capital? Will this screw stuff up for linux servers?
Reply With Quote
  #3  
Unread 19th May, 2010, 10:30 PM
Matthew Matthew is offline
Holy Shit!!
 
Join Date: Dec 2004
Posts: 2,382
Default

Quote:
Originally Posted by 3apa3a View Post
should the i in "ipToCountry" be lowercase or capital? Will this screw stuff up for linux servers?
Good question. For some reason, the old IpToCountry builds would save the INI file as "ipToCountry" on Gentoo, and then when data needed to be loaded from the file it was looking for "IpToCountry", and wouldn't see any data there (it was very weird...).

I decided to make everything in this 1.6 version be "ipToCountry", with exception of the AOL extension. This is why the upgrade instructions say to remove both the old .INI and the old .U

The Linux builds of UT should auto-search for .U files via a case-insensitive search. The name of the .INI file however *will matter*, but since I changed the convention for query servers in this edition, the .INI should just be deleted and auto-generated anyway.

Last edited by Matthew : 19th May, 2010 at 10:35 PM.
Reply With Quote
  #4  
Unread 19th May, 2010, 10:33 PM
Letylove49's Avatar
Letylove49 Letylove49 is offline
Holy Shit!!
 
Join Date: Mar 2005
Posts: 691
Default

Matthews why the release date is 21 May ? we are the 19th May not the 21th today.
__________________


Letylove49 aka Shado
Reply With Quote
  #5  
Unread 19th May, 2010, 10:37 PM
Matthew Matthew is offline
Holy Shit!!
 
Join Date: Dec 2004
Posts: 2,382
Default

Quote:
Originally Posted by Letylove49 View Post
Matthews why the release date is 21 May ? we are the 19th May not the 21th today.
Finished faster than I anticipated and forgot to update it; I wrote the readme last week.
Reply With Quote
  #6  
Unread 19th May, 2010, 10:42 PM
Letylove49's Avatar
Letylove49 Letylove49 is offline
Holy Shit!!
 
Join Date: Mar 2005
Posts: 691
Default

ok thanks
for the answere. and thanks for your work.
__________________


Letylove49 aka Shado
Reply With Quote
  #7  
Unread 19th May, 2010, 11:17 PM
{MOS}*KrystoF* {MOS}*KrystoF* is offline
Rampage
 
Join Date: Apr 2010
Posts: 53
Default

Ty Matthew and all other people that have helped you.

I have installed it and it work well, i like what you have added more in the .ini file.

Ty again.

Last edited by {MOS}*KrystoF* : 19th May, 2010 at 11:33 PM.
Reply With Quote
  #8  
Unread 20th May, 2010, 01:37 AM
qwerty's Avatar
qwerty qwerty is offline
Holy Shit!!
 
Join Date: Jan 2006
Posts: 676
Default

I Love You
__________________
https://www.vulpinemission.com
ROCKET-X8 Server
MONSTERHUNT w/ NALI WEAPONS 3 + RX8
BUNNYTRACK NY
Reply With Quote
  #9  
Unread 20th May, 2010, 01:56 AM
Rush's Avatar
Rush Rush is offline
Holy Shit!!
 
Join Date: Apr 2003
Location: Texas
Posts: 1,157
Default

Matthew, I occasionally follow what happens in the Unrealadmin community. You have done an immensely great job, BIG THANKS for continuing what I started with this MOD. It is true that I no longer have an active interest in the community but I still DO care. It is very rewarding to think that something you created lives on, big cheers dude and thumbs up.
__________________
[email address]
Reply With Quote
  #10  
Unread 19th May, 2010, 10:16 PM
Matthew Matthew is offline
Holy Shit!!
 
Join Date: Dec 2004
Posts: 2,382
Default

Quote:
Originally Posted by qwerty View Post
I Love You
<3
Quote:
Originally Posted by Rush View Post
Matthew, I occasionally follow what happens in the Unrealadmin community. You have done an immensely great job, BIG THANKS for continuing what I started with this MOD. It is true that I no longer have an active interest in the community but I still DO care. It is very rewarding to think that something you created lives on, big cheers dude and thumbs up.
Thanks rush
Reply With Quote
  #11  
Unread 20th May, 2010, 03:13 AM
Killerbee Killerbee is offline
Dominating
 
Join Date: Dec 2005
Location: Netherlands
Posts: 139
Default

Thx something gOOd to upgrade!
__________________
>>>> www.online-multigaming.com <<<<

We do nerd around!
Reply With Quote
  #12  
Unread 20th May, 2010, 05:57 AM
TSQ TSQ is offline
Dominating
 
Join Date: Sep 2005
Location: USA
Posts: 172
Default

Good job works great!
__________________
www.tsgc-clan.com


Reply With Quote
  #13  
Unread 21st May, 2010, 09:53 PM
back4more's Avatar
back4more back4more is offline
Holy Shit!!
 
Join Date: Oct 2008
Location: NextDoor
Posts: 1,908
Default

thanks alot for this upgrade Mathew.

Regards

BFM
Reply With Quote
  #14  
Unread 22nd May, 2010, 03:03 AM
nik_mz nik_mz is offline
Killing Spree
 
Join Date: Jan 2007
Posts: 19
Default

Unfortunately new version no longer works with MODOSUtilsV26pre5 (flags in DM mode)
__________________
Reply With Quote
  #15  
Unread 22nd May, 2010, 10:36 AM
Matthew Matthew is offline
Holy Shit!!
 
Join Date: Dec 2004
Posts: 2,382
Default

Quote:
Originally Posted by nik_mz View Post
Unfortunately new version no longer works with MODOSUtilsV26pre5 (flags in DM mode)
I would imagine that the coder must have hard-coded IpToCountry into the mod instead of calling the GetItemName function of Actor. I'd ask the coder to try and fix.
Reply With Quote
  #16  
Unread 22nd May, 2010, 11:38 AM
qwerty's Avatar
qwerty qwerty is offline
Holy Shit!!
 
Join Date: Jan 2006
Posts: 676
Default

I'm also having a problem now where the country flags dont show in BT any ideas? otherwise its still doing look ups

please and thank you
__________________
https://www.vulpinemission.com
ROCKET-X8 Server
MONSTERHUNT w/ NALI WEAPONS 3 + RX8
BUNNYTRACK NY
Reply With Quote
  #17  
Unread 22nd May, 2010, 11:50 AM
Matthew Matthew is offline
Holy Shit!!
 
Join Date: Dec 2004
Posts: 2,382
Default

Quote:
Originally Posted by qwerty View Post
I'm also having a problem now where the country flags dont show in BT any ideas? otherwise its still doing look ups

please and thank you
What BT version (what .u, specifically)? I'll do a quick code look-over.
Reply With Quote
  #18  
Unread 22nd May, 2010, 03:07 PM
qwerty's Avatar
qwerty qwerty is offline
Holy Shit!!
 
Join Date: Jan 2006
Posts: 676
Default

BTPlusPlusv097.u
__________________
https://www.vulpinemission.com
ROCKET-X8 Server
MONSTERHUNT w/ NALI WEAPONS 3 + RX8
BUNNYTRACK NY
Reply With Quote
  #19  
Unread 22nd May, 2010, 03:45 PM
Matthew Matthew is offline
Holy Shit!!
 
Join Date: Dec 2004
Posts: 2,382
Default

Quote:
Originally Posted by qwerty View Post
BTPlusPlusv097.u
The source is stripped from the package, which makes it impossible to edit (so you'll have to contact the author). But I loaded it up into WOTGreal Exporter and I can see why it no longer works; the coder didn't follow the recommended implementation scheme, and when I changed a few things on the inside it broke this mod's ability to find IpToCountry. It's a very easy fix as long as someone has source code.
Reply With Quote
  #20  
Unread 22nd May, 2010, 06:18 PM
qwerty's Avatar
qwerty qwerty is offline
Holy Shit!!
 
Join Date: Jan 2006
Posts: 676
Default

well thanks for looking much appreciated
__________________
https://www.vulpinemission.com
ROCKET-X8 Server
MONSTERHUNT w/ NALI WEAPONS 3 + RX8
BUNNYTRACK NY
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:12 PM.


 

All pages are copyright The Unreal Admins Page.
You may not copy any pages without our express permission.