Browse Source

ban IPv6 IPs correctly too

spaghetti 6 years ago
parent
commit
6a6905d32e
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      classes/tools.class.php

+ 1
- 1
classes/tools.class.php View File

@@ -7,7 +7,7 @@ class Tools {
7 7
    */
8 8
   public static function site_ban_ip($IP) {
9 9
     global $Debug;
10
-    $A = substr($IP, 0, strcspn($IP, '.'));
10
+    $A = substr($IP, 0, strcspn($IP, '.:'));
11 11
     $IPNum = Tools::ip_to_unsigned($IP);
12 12
     $IPBans = G::$Cache->get_value('ip_bans_'.$A);
13 13
     if (!is_array($IPBans)) {

Loading…
Cancel
Save