]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
geoipfree plugin return country codes inloawer cas (like geoip and country caught...
authoreldy <>
Sat, 26 Jul 2003 16:33:42 +0000 (16:33 +0000)
committereldy <>
Sat, 26 Jul 2003 16:33:42 +0000 (16:33 +0000)
wwwroot/cgi-bin/plugins/geoipfree.pm

index d1a50d9587c03aef7da51cfeef7e7c4600d54823..86404ec8f98d1ae2a05b8ef411f2b889f57c304a 100644 (file)
@@ -67,7 +67,9 @@ sub GetCountryCodeByName_geoipfree {
        # <-----
        my $res=$TmpDomainLookup{$_[0]}||'';
        if (! $res) {
-               ($res,undef)=$gi->LookUp($_[0]); if ($res !~ /\w\w/) { $res='ip'; }
+               ($res,undef)=$gi->LookUp($_[0]);
+               if ($res !~ /\w\w/) { $res='ip'; }
+               else { $res=lc($res); }
                $TmpDomainLookup{$_[0]}=$res;
                if ($Debug) { debug("  GetCountryCodeByName for $_[0]: $res",5); }
        }
@@ -85,7 +87,9 @@ sub GetCountryCodeByAddr_geoipfree {
        # <-----
        my $res=$TmpDomainLookup{$_[0]}||'';
        if (! $res) {
-               ($res,undef)=$gi->LookUp($_[0]); if ($res !~ /\w\w/) { $res='ip'; }
+               ($res,undef)=$gi->LookUp($_[0]);
+               if ($res !~ /\w\w/) { $res='ip'; }
+               else { $res=lc($res); }
                $TmpDomainLookup{$_[0]}=$res;
                if ($Debug) { debug("  GetCountryCodeByAddr for $_[0]: $res",5); }
        }