… | |
… | |
841 | # hack to make SURE we find the IP address all right |
841 | # hack to make SURE we find the IP address all right |
842 | # can be removed once AnyEvent::DNS is proven stable. |
842 | # can be removed once AnyEvent::DNS is proven stable. |
843 | if ($host eq "gameserver.deliantra.net") { |
843 | if ($host eq "gameserver.deliantra.net") { |
844 | AnyEvent::DNS::a "dnstest.deliantra.net", sub { |
844 | AnyEvent::DNS::a "dnstest.deliantra.net", sub { |
845 | if ($_[0] ne "80.101.114.108") { # Perl |
845 | if ($_[0] ne "80.101.114.108") { # Perl |
|
|
846 | status "dns failure, trying differently"; |
|
|
847 | $host = eval { Socket::inet_ntoa Socket::inet_aton "gameserver.deliantra.net" }; |
|
|
848 | unless (defined $host) { |
846 | status "dns failure, using hardcoded address"; |
849 | status "dns failure, using hardcoded address"; |
847 | $host = "129.13.162.95"; |
850 | $host = "129.13.162.95"; |
|
|
851 | } |
848 | } |
852 | } |
849 | |
853 | |
850 | dc_connect $host, $port; |
854 | dc_connect $host, $port; |
851 | }; |
855 | }; |
852 | } else { |
856 | } else { |