|
@ -810,6 +810,15 @@ function checkBan($board = false) { |
|
|
if (event('check-ban', $board)) |
|
|
if (event('check-ban', $board)) |
|
|
return true; |
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
$ips = array(); |
|
|
|
|
|
|
|
|
|
|
|
$ips[] = $_SERVER['REMOTE_ADDR']; |
|
|
|
|
|
|
|
|
|
|
|
if ($config['proxy_check'] && isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { |
|
|
|
|
|
$ips = array_merge($ips, explode(", ", $_SERVER['HTTP_X_FORWARDED_FOR'])); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
foreach ($ips as $ip) { |
|
|
$bans = Bans::find($_SERVER['REMOTE_ADDR'], $board, $config['show_modname']); |
|
|
$bans = Bans::find($_SERVER['REMOTE_ADDR'], $board, $config['show_modname']); |
|
|
|
|
|
|
|
|
foreach ($bans as &$ban) { |
|
|
foreach ($bans as &$ban) { |
|
@ -832,6 +841,7 @@ function checkBan($board = false) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// I'm not sure where else to put this. It doesn't really matter where; it just needs to be called every |
|
|
// I'm not sure where else to put this. It doesn't really matter where; it just needs to be called every |
|
|
// now and then to keep the ban list tidy. |
|
|
// now and then to keep the ban list tidy. |
|
|