mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Update announce.php
This commit is contained in:
parent
4ae5df2135
commit
595784acd6
1 changed files with 10 additions and 4 deletions
|
@ -67,10 +67,16 @@ if (strlen($peer_id) !== 20) {
|
||||||
// Check for client ban
|
// Check for client ban
|
||||||
if ($bb_cfg['client_ban']['enabled']) {
|
if ($bb_cfg['client_ban']['enabled']) {
|
||||||
foreach ($bb_cfg['client_ban']['clients'] as $clientId => $reason) {
|
foreach ($bb_cfg['client_ban']['clients'] as $clientId => $reason) {
|
||||||
if (($bb_cfg['client_ban']['only_allow_mode'] && !str_starts_with($peer_id, $clientId))
|
if ($bb_cfg['client_ban']['only_allow_mode']) {
|
||||||
|| str_starts_with($peer_id, $clientId)
|
if (!str_starts_with($peer_id, $clientId)) {
|
||||||
) {
|
msg_die('Your BitTorrent client has been banned!');
|
||||||
msg_die((empty($reason) || $bb_cfg['client_ban']['only_allow_mode']) ? 'Your BitTorrent client has been banned!' : $reason);
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (str_starts_with($peer_id, $clientId)) {
|
||||||
|
msg_die(empty($reason) ? 'Your BitTorrent client has been banned!' : $reason);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue