diff --git a/world/client.cpp b/world/client.cpp index f109a5cdf..30128c076 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -1228,13 +1228,16 @@ void Client::Clearance(int8 response) if(local_addr[0]) { zs_addr = local_addr; } else { - if(strcmp(local_addr, "127.0.0.1") == 0) + struct in_addr in; + in.s_addr = zs->GetIP(); + zs_addr = inet_ntoa(in); + + if(strcmp(zs_addr, "127.0.0.1") == 0) { + Log.Out(Logs::Detail, Logs::World_Server, "Local zone address was %s, setting local address to: %s", zs_addr, WorldConfig::get()->LocalAddress.c_str()); zs_addr = WorldConfig::get()->LocalAddress.c_str(); } else { - struct in_addr in; - in.s_addr = zs->GetIP(); - zs_addr = inet_ntoa(in); + Log.Out(Logs::Detail, Logs::World_Server, "Local zone address %s", zs_addr); } } @@ -1243,15 +1246,7 @@ void Client::Clearance(int8 response) if(addr[0]) { zs_addr = addr; } else { - if(strcmp(addr, "127.0.0.1") == 0) - { - zs_addr = WorldConfig::get()->WorldAddress.c_str(); - } - else { - struct in_addr in; - in.s_addr = zs->GetIP(); - zs_addr = inet_ntoa(in); - } + zs_addr = WorldConfig::get()->WorldAddress.c_str(); } } diff --git a/world/zoneserver.h b/world/zoneserver.h index 0c2cd6bec..125ac33f9 100644 --- a/world/zoneserver.h +++ b/world/zoneserver.h @@ -56,7 +56,7 @@ public: inline uint32 GetIP() const { return tcpc->GetrIP(); } inline uint16 GetPort() const { return tcpc->GetrPort(); } inline const char* GetCAddress() const { return clientaddress; } - inline const char* GetCLocalAddress() const { return clientaddress; } + inline const char* GetCLocalAddress() const { return clientlocaladdress; } inline uint16 GetCPort() const { return clientport; } inline uint32 GetID() const { return ID; } inline bool IsBootingUp() const { return BootingUp; }