Update LoginServer.cpp
This commit is contained in:
parent
999d100d44
commit
a5c66e703a
1 changed files with 4 additions and 2 deletions
|
@ -1024,9 +1024,11 @@ int32 LoginServer::DetermineCharacterLoginRequest ( UsertoWorldRequest_Struct* u
|
|||
ipv4addr = ntohl(myaddr.sin_addr.s_addr);
|
||||
|
||||
#else
|
||||
inet_pton(AF_INET, utwr->ip_address, &ipv4addr);
|
||||
result = inet_pton(AF_INET, utwr->ip_address, &ipv4addr);
|
||||
if(result)
|
||||
ipv4addr = ntohl(ipv4addr);
|
||||
#endif
|
||||
if((result > 0 && (ipv4addr = ntohl(ipv4addr)) && IsPrivateAddress(ipv4addr)) || (strcmp(net.GetWorldAddress(), utwr->ip_address)==0) && (strlen(net.GetInternalWorldAddress())>0))
|
||||
if((result > 0 && IsPrivateAddress(ipv4addr)) || (strcmp(net.GetWorldAddress(), utwr->ip_address)==0) && (strlen(net.GetInternalWorldAddress())>0))
|
||||
strcpy(utwrs->ip_address, net.GetInternalWorldAddress());
|
||||
else
|
||||
strcpy(utwrs->ip_address, net.GetWorldAddress());
|
||||
|
|
Loading…
Add table
Reference in a new issue