"*", them->GetIPString());
if (ServerInstance->XLines->AddLine(kl,NULL))
{
- std::string timestr = ServerInstance->TimeString(kl->expiry);
+ std::string timestr = InspIRCd::TimeString(kl->expiry);
ServerInstance->SNO->WriteGlobalSno('x',"K:line added due to DNSBL match on *@%s to expire on %s: %s",
them->GetIPString().c_str(), timestr.c_str(), reason.c_str());
ServerInstance->XLines->ApplyLines();
}
else
+ {
delete kl;
+ return;
+ }
break;
}
case DNSBLConfEntry::I_GLINE:
"*", them->GetIPString());
if (ServerInstance->XLines->AddLine(gl,NULL))
{
- std::string timestr = ServerInstance->TimeString(gl->expiry);
+ std::string timestr = InspIRCd::TimeString(gl->expiry);
ServerInstance->SNO->WriteGlobalSno('x',"G:line added due to DNSBL match on *@%s to expire on %s: %s",
them->GetIPString().c_str(), timestr.c_str(), reason.c_str());
ServerInstance->XLines->ApplyLines();
}
else
+ {
delete gl;
+ return;
+ }
break;
}
case DNSBLConfEntry::I_ZLINE:
them->GetIPString());
if (ServerInstance->XLines->AddLine(zl,NULL))
{
- std::string timestr = ServerInstance->TimeString(zl->expiry);
+ std::string timestr = InspIRCd::TimeString(zl->expiry);
ServerInstance->SNO->WriteGlobalSno('x',"Z:line added due to DNSBL match on *@%s to expire on %s: %s",
them->GetIPString().c_str(), timestr.c_str(), reason.c_str());
ServerInstance->XLines->ApplyLines();
}
else
+ {
delete zl;
+ return;
+ }
break;
}
case DNSBLConfEntry::I_UNKNOWN:
catch (DNS::Exception &ex)
{
delete r;
- ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, std::string(ex.GetReason()));
+ ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, ex.GetReason());
}
if (user->quitting)
total_hits += (*i)->stats_hits;
total_misses += (*i)->stats_misses;
- results.push_back(ServerInstance->Config->ServerName + " 304 " + user->nick + " :DNSBLSTATS DNSbl \"" + (*i)->name + "\" had " +
+ results.push_back("304 " + user->nick + " :DNSBLSTATS DNSbl \"" + (*i)->name + "\" had " +
ConvToStr((*i)->stats_hits) + " hits and " + ConvToStr((*i)->stats_misses) + " misses");
}
- results.push_back(ServerInstance->Config->ServerName + " 304 " + user->nick + " :DNSBLSTATS Total hits: " + ConvToStr(total_hits));
- results.push_back(ServerInstance->Config->ServerName + " 304 " + user->nick + " :DNSBLSTATS Total misses: " + ConvToStr(total_misses));
+ results.push_back("304 " + user->nick + " :DNSBLSTATS Total hits: " + ConvToStr(total_hits));
+ results.push_back("304 " + user->nick + " :DNSBLSTATS Total misses: " + ConvToStr(total_misses));
return MOD_RES_PASSTHRU;
}