]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Fix IP WHOIS
authorValerie Pond <redacted>
Mon, 6 Feb 2023 20:17:41 +0000 (20:17 +0000)
committerValerie Pond <redacted>
Mon, 6 Feb 2023 20:17:41 +0000 (20:17 +0000)
tools/ip-whois.php

index 214b9b892496ca4919cc8b43bd48adcbf3dfa6e2..6c16d5fe0ecd3da332bb45e9c50b0ccf03137988 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
-require_once "common.php";
-require_once "header.php";
+require_once "../common.php";
+require_once "../header.php";
 
 $ip_info = [];
 $ip = NULL;
@@ -33,9 +33,8 @@ else
         if (!strlen($line) && $start)
             $i++;
 
-        if (!ctype_alnum($line[0])) // we don't care about your opinion we just want the info
+        if (($line && !ctype_alnum($line[0])) || !$line) // we don't care about your opinion we just want the info
             continue;
-
         $start = true;
         $tok = split($line);
         foreach ($tok as &$t)
@@ -106,4 +105,4 @@ if ($ip)
        </div>
 </div>
 
-<?php require_once("footer.php");
\ No newline at end of file
+<?php require_once("../footer.php");
\ No newline at end of file