diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-03-31 00:12:36 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-03-31 00:12:36 +1100 |
| commit | b4aa39ca2def14eb1f6521eeb9e6f0a76b3720f5 (patch) | |
| tree | e5c5170a68878393391ad4461c48c2f2ac4d7b93 /mod.php | |
| parent | 6f62e038d48a341cac989d363603cb2d3780acd1 (diff) | |
IP range bans
Diffstat (limited to 'mod.php')
| -rw-r--r-- | mod.php | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -945,7 +945,7 @@ } if($query->rowCount() < 1) { - $body = '(There are no active bans.)'; + $body = '<p style="text-align:center" class="unimportant">(There are no active bans.)</p>'; } else { $body = '<form action="" method="post">'; $body .= '<table><tr><th>IP address</th><th>Reason</th><th>Set</th><th>Expires</th><th>Staff</th></tr>'; @@ -964,9 +964,13 @@ '<input type="checkbox" name="ban_' . $ban['ip'] . '" id="ban_' . $ban['ip'] . '" /> ' . // IP address - '<a href="?/IP/' . - $ban['ip'] . - '">'. $ban['ip'] . '</a></td>' . + (preg_match('/^(\d+\.\d+\.\d+\.\d+|' . $config['ipv6_regex'] . ')$/', $ban['ip']) ? + '<a href="?/IP/' . + $ban['ip'] . + '">'. $ban['ip'] . '</a>' + : $ban['ip']) . + + '</td>' . // Reason '<td>' . ($ban['reason'] ? $ban['reason'] : '<em>-</em>') . '</td>' . |
