From f49ed93cd994259ef7e0cb801a4b6fb3607cc0fd Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 10 Jul 2024 14:12:28 +0100 Subject: Include the network name in the DroneBL example config. --- src/modules/m_dnsbl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/modules/m_dnsbl.cpp') diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 93cec18a1..c0aa4aa21 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -366,9 +366,10 @@ public: if (match) { const std::string reason = Template::Replace(config->reason, { - { "dnsbl", config->name }, - { "ip", them->GetAddress() }, - { "result", ConvToStr(result) }, + { "dnsbl", config->name }, + { "ip", them->GetAddress() }, + { "network", ServerInstance->Config->Network }, + { "result", ConvToStr(result) }, }); config->stats_hits++; -- cgit v1.3.1-10-gc9f91 From 0f3d949bbd04f332ea1370f0d1c50b8515619aaa Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 11 Jul 2024 12:50:31 +0100 Subject: Add URL encoded versions of the DNSBL/network to the dnsbl module. --- docs/conf/providers/dronebl.example.conf | 2 +- src/modules/m_dnsbl.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src/modules/m_dnsbl.cpp') diff --git a/docs/conf/providers/dronebl.example.conf b/docs/conf/providers/dronebl.example.conf index bc744314a..c865d9742 100644 --- a/docs/conf/providers/dronebl.example.conf +++ b/docs/conf/providers/dronebl.example.conf @@ -8,4 +8,4 @@ records="3,5,6,7,8,9,10,11,13,14,15,16,17,19" action="zline" duration="7d" - reason="You are listed in DroneBL. Please visit https://dronebl.org/lookup.do?ip=%ip%&network=%network% for more information."> + reason="You are listed in DroneBL. Please visit https://dronebl.org/lookup.do?ip=%ip%&network=%network.url% for more information."> diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index c0aa4aa21..ac6666626 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -366,10 +366,12 @@ public: if (match) { const std::string reason = Template::Replace(config->reason, { - { "dnsbl", config->name }, - { "ip", them->GetAddress() }, - { "network", ServerInstance->Config->Network }, - { "result", ConvToStr(result) }, + { "dnsbl", config->name }, + { "dnsbl.url", Percent::Encode(config->name) }, + { "ip", them->GetAddress() }, + { "network", ServerInstance->Config->Network }, + { "network.url", Percent::Encode(ServerInstance->Config->Network) }, + { "result", ConvToStr(result) }, }); config->stats_hits++; -- cgit v1.3.1-10-gc9f91