summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-31 17:57:57 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-31 17:57:57 +0000
commitde08da58f7a8af9f0fae1b98aeee1dfb10fb06fe (patch)
tree6cf76b003de142c267ec8dedeece147f513d15d2 /src
parent3b1e5822f6f1b64a91f91be1436e95db302c57c0 (diff)
Bloody hell, just how many modules use this shit
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8433 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_dnsbl.cpp37
1 files changed, 25 insertions, 12 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 3c2d18e75..b2fb04dd1 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -113,28 +113,41 @@ class DNSBLResolver : public Resolver
}
case DNSBLConfEntry::I_KLINE:
{
- std::string ban = std::string("*@") + them->GetIPString();
- if (show)
- ServerInstance->XLines->ApplyLines();
- show = ServerInstance->XLines->AddKLine(ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(), ban.c_str());
- FOREACH_MOD(I_OnAddKLine,OnAddKLine(ConfEntry->duration, NULL, reason, ban));
+ KLine* kl = new KLine(ServerInstance, ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(),
+ "*", them->GetIPString());
+ if (ServerInstance->XLines->AddLine(kl))
+ {
+ ServerInstance->XLines->ApplyLines();
+ FOREACH_MOD(I_OnAddKLine,OnAddKLine(ConfEntry->duration, NULL, reason, them->GetIPString()));
+ }
+ else
+ delete kl;
break;
}
case DNSBLConfEntry::I_GLINE:
{
- std::string ban = std::string("*@") + them->GetIPString();
- show = ServerInstance->XLines->AddGLine(ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(), ban.c_str());
- if (show)
+ GLine* gl = new GLine(ServerInstance, ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(),
+ "*", them->GetIPString());
+ if (ServerInstance->XLines->AddLine(gl))
+ {
ServerInstance->XLines->ApplyLines();
- FOREACH_MOD(I_OnAddGLine,OnAddGLine(ConfEntry->duration, NULL, reason, ban));
+ FOREACH_MOD(I_OnAddGLine,OnAddGLine(ConfEntry->duration, NULL, reason, them->GetIPString()));
+ }
+ else
+ delete gl;
break;
}
case DNSBLConfEntry::I_ZLINE:
{
- show = ServerInstance->XLines->AddZLine(ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(), them->GetIPString());
- if (show)
+ ZLine* zl = new ZLine(ServerInstance, ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(),
+ them->GetIPString());
+ if (ServerInstance->XLines->AddLine(zl))
+ {
ServerInstance->XLines->ApplyLines();
- FOREACH_MOD(I_OnAddZLine,OnAddZLine(ConfEntry->duration, NULL, reason, them->GetIPString()));
+ FOREACH_MOD(I_OnAddZLine,OnAddZLine(ConfEntry->duration, NULL, reason, them->GetIPString()));
+ }
+ else
+ delete zl;
break;
}
case DNSBLConfEntry::I_UNKNOWN: