IP2Country doesnt work on MH servers?

Discussions about Servers
Post Reply
Pileyrei
Masterful
Posts: 745
Joined: Tue May 05, 2009 3:10 pm
Personal rank: UT Survivor

IP2Country doesnt work on MH servers?

Post by Pileyrei »

Whilst playing on one of Hitman's legendary MH servers I noticed country flags did not show up.

Was told the IP2Country services doesn't work with MH?

Can anyone explain why it doesn't work in MH?

Genuinely curious!
Image

Our Server
Image

[donate][/donate]
Donate to UT99.org!
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: IP2Country doesnt work on MH servers?

Post by Barbie »

Pileyrei wrote:country flags did not show up.
Clients need the texture for the flags, so server should have

Code: Select all

[Engine.GameEngine]
ServerPackages=CountryFlags2.utx
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Pileyrei
Masterful
Posts: 745
Joined: Tue May 05, 2009 3:10 pm
Personal rank: UT Survivor

Re: IP2Country doesnt work on MH servers?

Post by Pileyrei »

Thanks Barbie

I'll test it on my MH server.

Was told it doesn't work on MH servers ?!
Image

Our Server
Image

[donate][/donate]
Donate to UT99.org!
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: IP2Country doesnt work on MH servers?

Post by sektor2111 »

It depends on how much "http" load is being in use... Somewhere in code is described whatever glitch - already posted...
Else with XCGE loaded, IpToCountry doesn't look very active - at least mutate command seems borked shortly. I made a modification which is using to show Player country in next 20 seconds from join, but player entered later is not always identified... I think these http related things are not such a good stuff for UT... and nobody seems busy to clarify this chapter.
I believe IpToCountry is initializing that http tool right in PostBeginPlay which is early. To be honest I think is too fast, what if nobody is joining in firsts 10 minutes but 2 players are coming later - let me see, exist chances to not work...
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: IP2Country doesnt work on MH servers?

Post by Barbie »

Pileyrei wrote:Was told it doesn't work on MH servers ?!
IMO there is nothing like "a MH server" - there are different versions and several custom changes made on original MH...
I've noticed that for example "MonsterHunt2Gold" contains an embedded IpToCountry LinkActor.

My MH server based on "MonsterHunt2v3" that does not contain IpToCountry functions, so I use an additionally Mutator "ipToCountry-1.6" for it. At least Nexgen112 shows some flags in the "Private Message" window then.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: IP2Country doesnt work on MH servers?

Post by Chamberly »

As what Barbie said... some version require different IP2C version. Did experienced this before until reading the complete documentation point it all out.
Image
Image
Image Edit: Why does my sig not work anymore?
User avatar
Hitman
Adept
Posts: 281
Joined: Mon Aug 16, 2010 11:01 am
Location: Sweden
Contact:

Re: IP2Country doesnt work on MH servers?

Post by Hitman »

IpToCountry is working fine on the MH-server with standard weapons, but on the MH with NW3 weapons it breaks something so it refuse to start, same with if I add some custom weapons true StuffSwapper like with the EXU-Pack,the all run with the 451-version and i have no clue why it is like this so if someone knows why i like to now.. :???: :noidea
SC]-[WARTZ_{HoF}
Adept
Posts: 426
Joined: Tue Feb 21, 2012 7:29 pm

Re: IP2Country doesnt work on MH servers?

Post by SC]-[WARTZ_{HoF} »

I run NW3 MH server with IpToCountry and no problems. I have some time now to look into these things so let me know if you need help.
Image
Image
Image
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: IP2Country doesnt work on MH servers?

Post by Chamberly »

Hitman wrote:IpToCountry is working fine on the MH-server with standard weapons, but on the MH with NW3 weapons it breaks something so it refuse to start, same with if I add some custom weapons true StuffSwapper like with the EXU-Pack,the all run with the 451-version and i have no clue why it is like this so if someone knows why i like to now.. :???: :noidea
Does anything shows up in the log?
Image
Image
Image Edit: Why does my sig not work anymore?
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: IP2Country doesnt work on MH servers?

Post by sektor2111 »

My question stays at scenario:

A Player is playing 30 minutes and gets tired, leaving... After 10 minutes another one is entering continuing map. Does THIS last player after 40 minutes is being identified properly or you like to say that it do works properly but in fact it doesn't ?

Obviously I would like to know how to setup server for keeping this thing running not only a few seconds as it is right now in my one - or mapvote configured with that HTTP info is conflicting with IpToCountry ? Light me up... or do I need to "heartbeat" server for keeping this thing running properly ? This won't happen...
I even can recall that in the past if some player was entering very late in game after more than 20 minutes, mutate command did not work for player identification, these happening without any XC stuff loaded. You can decompile code and walk through classes, then you'll see lines describing that it sometimes goes borked, and it do happens...

@Chamberly
Decompile that thing and see if it do logs something. Code is wrapped so it doesn't report when HTTP actor is missing and neither shows any warning - it lacks at debugging side...

In other observations: A server even without XC stuff uses to close empty connections after some time - read this well. I'm not surprised to see this thing as being out of duty after some time from Level's beginning. When such a connection is closed after time it mess up PlayerCanSeeMe (fixed in XCGE) and other things dependent on a connection which nobody owns. It's a stupid UnrealEngine1 after all...
User avatar
Hitman
Adept
Posts: 281
Joined: Mon Aug 16, 2010 11:01 am
Location: Sweden
Contact:

Re: IP2Country doesnt work on MH servers?

Post by Hitman »

Barbie wrote:
Pileyrei wrote:Was told it doesn't work on MH servers ?!
IMO there is nothing like "a MH server" - there are different versions and several custom changes made on original MH...
I've noticed that for example "MonsterHunt2Gold" contains an embedded IpToCountry LinkActor.

My MH server based on "MonsterHunt2v3" that does not contain IpToCountry functions, so I use an additionally Mutator "ipToCountry-1.6" for it. At least Nexgen112 shows some flags in the "Private Message" window then.
Nop it just dies..
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: IP2Country doesnt work on MH servers?

Post by Chamberly »

sektor2111 wrote:@Chamberly
Decompile that thing and see if it do logs something. Code is wrapped so it doesn't report when HTTP actor is missing and neither shows any warning - it lacks at debugging side...
Not sure what thing you are talking about. IP2C? Or a specific MH mod?

Either way, I don't know what all the guys are running here on the server, so something can go bork.
Image
Image
Image Edit: Why does my sig not work anymore?
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: IP2Country doesnt work on MH servers?

Post by sektor2111 »

Of course Is about Ip2C - I'm On Topic. Like I said, else probably other errors are not described being not very known. This mod is far from a good one...
HttpClient_class_from_IP2C wrote:

Code: Select all

...
function SetError(int code)
{
	Super.SetError(code);

	switch(code)
	{
		case -1:
			Log("[IpToCountry] Error in binding the port while connecting to "$S.QueryServerHost[S.currentServer]);
			break;
		case -2:
         		Log("[IpToCountry] Error while resolving the host "$S.QueryServerHost[S.currentServer]);
         		break;
		case -3:
			Log("[IpToCountry] "$S.QueryServerHost[S.currentServer]$" timed out after "$string(S.MaxTimeout)$" seconds");
			break;
		case -4:
			Log("[IpToCountry] Error resolving to the host of the IP for the domain "$S.QueryServerHost[S.currentServer]);
			break;
		default:
			Log("[IpToCountry] Server received HTTP error with code "$string(code)$" from "$S.QueryServerHost[S.currentServer]);
	}

	// sometimes the connection doesn't break immediately, it is probably due to some bug in UBrowserHTTPClient, if it happens we have to wait for it inside event Closed() cause we cannot open the same socket if it is already opened
	if(IsConnected())
	{
		bSwitchAtClose=True;
	}
	else
	{
		SwitchQueryServer("[IpToCountry] "$S.QueryServerHost[S.currentServer]$" failed! Trying the alternate server...");
		SendQueue();
	}
}
...
And maybe things are not working exactly as described, UT sometimes executes multiple times a code - can be a "Super" bad called and/or something bugged and not rewritten properly.
When a mod describes whatever problem I think is not the single one :| , there might be more category=UNKNOWN.
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: IP2Country doesnt work on MH servers?

Post by Chamberly »

Alright so IP2C, I downloaded the source code that I found and compared it with what I decompiled and it looked mostly same but something is still not right when I try to compile it, it won't complete the process. Which is what I either guess if it used a different UT version (v451/v451a/v451b/whatever) to compile it. It wouldn't work with what I tried - v436. Unless something is missing to complete the whole thing.
Image
Image
Image Edit: Why does my sig not work anymore?
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: IP2Country doesnt work on MH servers?

Post by sektor2111 »

I don't know how goes with that source-code, I compiled multiple versions many times but results are not that good...
Post Reply