}
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));
+ 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->MakeHostIP()));
+ }
+ else
+ delete kl;
break;
}
case DNSBLConfEntry::I_GLINE:
{
- 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));
+ 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, them->MakeHostIP()));
+ }
+ else
+ delete gl;
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()));
+ 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()));
+ }
+ else
+ delete zl;
break;
}
case DNSBLConfEntry::I_UNKNOWN: