Page 1 of 1

IP2Country doesnt work on MH servers?

Posted: Tue May 16, 2017 1:27 pm
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!

Re: IP2Country doesnt work on MH servers?

Posted: Tue May 16, 2017 2:49 pm
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

Re: IP2Country doesnt work on MH servers?

Posted: Tue May 16, 2017 3:25 pm
by Pileyrei
Thanks Barbie

I'll test it on my MH server.

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

Re: IP2Country doesnt work on MH servers?

Posted: Tue May 16, 2017 3:42 pm
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...

Re: IP2Country doesnt work on MH servers?

Posted: Tue May 16, 2017 7:01 pm
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.

Re: IP2Country doesnt work on MH servers?

Posted: Tue May 16, 2017 10:32 pm
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.

Re: IP2Country doesnt work on MH servers?

Posted: Thu May 18, 2017 12:06 am
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

Re: IP2Country doesnt work on MH servers?

Posted: Thu May 18, 2017 12:18 am
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.

Re: IP2Country doesnt work on MH servers?

Posted: Thu May 18, 2017 1:10 am
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?

Re: IP2Country doesnt work on MH servers?

Posted: Thu May 18, 2017 6:24 am
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...

Re: IP2Country doesnt work on MH servers?

Posted: Fri May 19, 2017 1:43 am
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..

Re: IP2Country doesnt work on MH servers?

Posted: Sat May 20, 2017 11:38 pm
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.

Re: IP2Country doesnt work on MH servers?

Posted: Sun May 21, 2017 8:15 am
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.

Re: IP2Country doesnt work on MH servers?

Posted: Sun May 21, 2017 3:44 pm
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.

Re: IP2Country doesnt work on MH servers?

Posted: Mon May 22, 2017 5:51 am
by sektor2111
I don't know how goes with that source-code, I compiled multiple versions many times but results are not that good...