From 75f0cba571dca97f181835d3645c3d42dd5daf2d Mon Sep 17 00:00:00 2001
From: brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Date: Tue, 22 May 2007 19:10:40 +0000
Subject: Someone forgot the blindingly obvious - APPLY the glines/zlines you
 add! they dont apply themselves :p

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7112 e03df62e-2008-0410-955e-edbf42e46eb7
---
 src/modules/m_dnsbl.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'src/modules/m_dnsbl.cpp')

diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index fc85e9cc7..27387871c 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -105,6 +105,8 @@ class DNSBLResolver : public Resolver
 						case DNSBLConfEntry::I_KLINE:
 						{
 							std::string ban = std::string("*@") + them->GetIPString();
+							if (show)
+								ServerInstance->XLines->apply_lines(APPLY_KLINES);								
 							show = ServerInstance->XLines->add_kline(ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(), ban.c_str());
 							FOREACH_MOD(I_OnAddKLine,OnAddKLine(ConfEntry->duration, NULL, reason, ban));
 							break;
@@ -113,12 +115,16 @@ class DNSBLResolver : public Resolver
 						{
 							std::string ban = std::string("*@") + them->GetIPString();
 							show = ServerInstance->XLines->add_gline(ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(), ban.c_str());
+							if (show)
+								ServerInstance->XLines->apply_lines(APPLY_GLINES);
 							FOREACH_MOD(I_OnAddGLine,OnAddGLine(ConfEntry->duration, NULL, reason, ban));
 							break;
 						}
 						case DNSBLConfEntry::I_ZLINE:
 						{
 							show = ServerInstance->XLines->add_zline(ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(), them->GetIPString());
+							if (show)
+								ServerInstance->XLines->apply_lines(APPLY_ZLINES);
 							FOREACH_MOD(I_OnAddZLine,OnAddZLine(ConfEntry->duration, NULL, reason, them->GetIPString()));
 							break;
 						}
@@ -130,7 +136,9 @@ class DNSBLResolver : public Resolver
 					}
 
 					if (show)
+					{
 						ServerInstance->WriteOpers("*** Connecting user %s detected as being on a DNS blacklist (%s) with result %d", them->GetFullRealHost(), ConfEntry->name.c_str(), bitmask);
+					}
 				}
 				else
 					ConfEntry->stats_misses++;
-- 
cgit v1.2.3