plugins/SpecialAdmin.php
changeset 270 5bcdee999015
parent 256 62ee6685ad18
child 271 f088805540ae
child 272 e0ec986c0af3
--- a/plugins/SpecialAdmin.php	Sat Nov 17 23:30:23 2007 -0500
+++ b/plugins/SpecialAdmin.php	Sun Nov 18 18:44:55 2007 -0500
@@ -2142,17 +2142,14 @@
         }
         if ( $type == BAN_IP )
         {
-          // parse a range of addresses
-          $range = parse_ip_range($entry);
-          if ( !$range )
+          if ( !isset($_POST['regex']) )
           {
-            $error = true;
-            echo '<div class="error-box">Malformed IP address expression.</div>';
-            break;
+            // as of 1.0.2 parsing is done at runtime
+            $entries[] = $entry;
           }
-          foreach ($range as $ip)
+          else
           {
-            $entries[] = $ip;
+            $entries[] = $entry;
           }
         }
         else
@@ -2204,7 +2201,7 @@
   ?>
   Type: <select name="type"><option value="<?php echo BAN_IP; ?>">IP address</option><option value="<?php echo BAN_USER; ?>">Username</option><option value="<?php echo BAN_EMAIL; ?>">E-mail address</option></select><br />
   Rule: <input type="text" name="value" size="30" /><br />
-  <small>You can ban multiple IP addresses, users, or e-mail addresses by separating entries with a single comma (User1,User2). Do not put a space after the comma. For IP addresses, you may specify ranges like 172|192.168.4-30|90-167.1-90, which will turn into 172 and 192 . 168 . 4-30 and 90-167 . 1 - 90, which matches 18,899 IP addresses. Don't specify large ranges (like the example one here) at once or you risk temporarily (~60sec) overloading the server.</small><br />
+  <small>You can ban multiple IP addresses, users, or e-mail addresses by separating entries with a single comma (User1,User2). Do not put a space after the comma. For IP addresses, you may specify ranges like 172|192.168.4-30|90-167.1-90, which will turn into 172 and 192 . 168 . 4-30 and 90-167 . 1 - 90, which matches 18,899 IP addresses.</small><br />
   Reason to show to the banned user: <textarea name="reason" rows="7" cols="40"></textarea><br />
   <input type="checkbox" name="regex" id="regex" />  <label for="regex">This rule is a regular expression</label> (advanced users only)<br />
   <input type="submit" style="font-weight: bold;" name="create" value="Create new ban rule" />