arteman (arteman) wrote in changelog,
arteman
arteman
changelog

[ljcom] r12832: LJSUP-14080: Add extended information ab...

Committer: azateev
LJSUP-14080: Add extended information about IPs into sysban view
U   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

Tags: arteman, azateev, ljcom, pl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments