From 9cfcf6e536dcec9fddb996d60179deeea92e4bdd Mon Sep 17 00:00:00 2001 From: Zankaria Date: Thu, 24 Apr 2025 00:53:04 +0200 Subject: [PATCH] context.php: add IpBlacklistService --- inc/context.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/inc/context.php b/inc/context.php index 4f7eea73..f2fe23a5 100644 --- a/inc/context.php +++ b/inc/context.php @@ -116,7 +116,17 @@ function build_context(array $config): Context { $c->get(FloodService::class), $c->get(IpNoteQueries::class), $c->get(LogDriver::class) - ) + ), + IpBlacklistService::class => function(Context $c): IpBlacklistService { + $config = $c->get('config'); + return new IpBlacklistService( + $c->get(DnsDriver::class), + $c->get(CacheDriver::class), + $config['dnsbl'], + $config['dnsbl_exceptions'], + $config['fcrdns'] + ); + } ]); }