diff --git a/bt/announce.php b/bt/announce.php index c40e72bf4..101e5cd02 100644 --- a/bt/announce.php +++ b/bt/announce.php @@ -67,9 +67,9 @@ if (strlen($peer_id) !== 20) { // Check for client ban if ($bb_cfg['client_ban']['enabled']) { - foreach (array_keys($bb_cfg['client_ban']['clients']) as $client) { - if (str_starts_with($peer_id, $client)) { - msg_die($bb_cfg['client_ban']['clients'][$client]); + foreach ($bb_cfg['client_ban']['clients'] as $clientId => $reason) { + if (str_starts_with($peer_id, $clientId)) { + msg_die($reason); } } }