|
@@ -261,14 +261,14 @@ module InterconnectionPointProtocolHandler
|
|
if iphost =~ /^\d+\.\d+\.\d+\.\d+/
|
|
if iphost =~ /^\d+\.\d+\.\d+\.\d+/
|
|
# find country code
|
|
# find country code
|
|
c = GeoIP.new('GeoIP.dat').country(iphost)[3].to_s.downcase
|
|
c = GeoIP.new('GeoIP.dat').country(iphost)[3].to_s.downcase
|
|
- rest << "(#{c})" unless c.nil?
|
|
|
|
|
|
+ rest.prepend " (#{c}) " unless c.nil?
|
|
|
|
|
|
# resolve it to a dns name
|
|
# resolve it to a dns name
|
|
f = Fiber.new do
|
|
f = Fiber.new do
|
|
Fiber.yield Resolv.getname(iphost)
|
|
Fiber.yield Resolv.getname(iphost)
|
|
end
|
|
end
|
|
domainname = f.resume
|
|
domainname = f.resume
|
|
- #host_name = ""
|
|
|
|
|
|
+ #domainname = ""
|
|
|
|
|
|
if domainname.nil? || domainname.empty?
|
|
if domainname.nil? || domainname.empty?
|
|
domainname = iphost
|
|
domainname = iphost
|