• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Request] Ip update code

Xleniz

New Member
Joined
Jul 6, 2009
Messages
178
Reaction score
3
Location
Sweden
My internet disconnects often (and IP changes), so I need a code that re-hosts OTServer when IP has changed. Is there such a code ?? Thx
 
My internet disconnects often (and IP changes), so I need a code that re-hosts OTServer when IP has changed. Is there such a code ?? Thx
You need code that check your IP every second and change value of serverIp in protocollogin.cpp:
PHP:
		uint32_t serverIp = serverIps[0].first;
		for(IpList::iterator it = serverIps.begin(); it != serverIps.end(); ++it)
		{
			if((it->first & it->second) != (clientIp & it->second))
				continue;

			serverIp = it->first;
			break;
		}
Do you use a no-ip address?
I think he use, but when your provider change your IP server still work (site, login server), but when player login to server, he receive list of characters with wrong IP(s) of server(s) and can't connect to game.
 

Similar threads

Back
Top