Committer: azateev
LJSUP-14080: Add extended information about IPs into sysban viewU trunk/cgi-bin/ljcom.pl
Modified: trunk/cgi-bin/ljcom.pl =================================================================== --- trunk/cgi-bin/ljcom.pl 2012-10-26 07:16:23 UTC (rev 12831) +++ trunk/cgi-bin/ljcom.pl 2012-10-26 12:31:02 UTC (rev 12832) @@ -137,6 +137,14 @@ return $gi->isp_by_addr($ip); } +sub exteneded_ip_info { + my $ip = shift; + return '' unless $ip; + return $ip unless $ip =~ /^(\d{1,3}\.){3}\d{1,3}$/; + my $country = country_of_ip($ip) || '-'; + my $isp = isp_of_ip($ip) || '-'; + return "$ip | $country | $isp"; +} # Name: acct_name_short # Input Parm: $caps