mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-22 18:20:31 -05:00
(Update) Announce Blacklist
This commit is contained in:
@@ -49,14 +49,12 @@ class AnnounceController extends Controller
|
||||
}
|
||||
|
||||
// Check If Client Is Blacklisted
|
||||
if(config('client-blacklist.enabled' == "true") {
|
||||
$blockedClients = config('client-blacklist.clients', []);
|
||||
foreach ($blockedClients as $blocked) {
|
||||
if ($blocked == $request->server('HTTP_USER_AGENT') ?: "Unknown") {
|
||||
return response(Bencode::bencode(['failure reason' => 'The Client You Are Trying To Use Has Been Blacklisted']), 200, ['Content-Type' => 'text/plain']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If Passkey Is Not Provided Exsist Return Error to Client
|
||||
if ($passkey == null) {
|
||||
|
||||
Reference in New Issue
Block a user