]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
remote.cgi: Use new location lookup method.
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 6 Dec 2019 13:39:54 +0000 (14:39 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Fri, 6 Dec 2019 13:39:54 +0000 (14:39 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/remote.cgi

index 8beb84efa736aac3af9a4b6574f8adfe029e52bb..d94d27d42563730b90b34f9bf2203cfcf56289ae 100644 (file)
@@ -278,6 +278,9 @@ sub printactivelogins()
        } else {
                # list active logins...
 
+               # Libloc database handle.
+               my $libloc_db_handle = &GeoIP::init();
+
                foreach my $line (@output)
                {
                        my @arry = split(/\ +/, $line);
@@ -288,7 +291,7 @@ sub printactivelogins()
                        $remoteip =~ s/[()]//g;
 
                        # display more information about that IP adress...
-                       my $ccode = &GeoIP::lookup($remoteip);
+                       my $ccode = &GeoIP::lookup_country_code($libloc_db_handle, $remoteip);
                        my $flag_icon = &GeoIP::get_flag_icon($ccode);
 
                        # get rDNS...