diff options
| author | Adam <Adam@anope.org> | 2011-08-21 13:38:42 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-09-10 01:55:09 -0400 |
| commit | 2eb708e5ad8b259876d24d828f7472b77864c256 (patch) | |
| tree | bed6b70d4bc67eb413453a116e77f8f724cdf3fd /modules/extra/m_dnsbl.cpp | |
| parent | 4fcb371bc8813cd647b7769a64d586e3a57d684d (diff) | |
Cleaned up some of the socket code, cleaned up the pipe engines, added support for binary sockets, and cleaned up the asynch connect/accept code
Diffstat (limited to 'modules/extra/m_dnsbl.cpp')
| -rw-r--r-- | modules/extra/m_dnsbl.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/modules/extra/m_dnsbl.cpp b/modules/extra/m_dnsbl.cpp index f62908b39..7e5342d3c 100644 --- a/modules/extra/m_dnsbl.cpp +++ b/modules/extra/m_dnsbl.cpp @@ -56,20 +56,19 @@ class DNSBLResolver : public DNSRequest reason = reason.replace_all_cs("%r", record_reason); reason = reason.replace_all_cs("%N", Config->NetworkName); - XLine *x = NULL; BotInfo *operserv = findbot(Config->OperServ); - if (this->add_to_akill && akills && (x = akills->Add(Anope::string("*@") + user->host, Config->OperServ, Anope::CurTime + this->blacklist.bantime, reason))) + Log(operserv) << "DNSBL: " << user->GetMask() << " appears in " << this->blacklist.name; + if (this->add_to_akill && akills) { - Log(operserv) << "DNSBL: " << user->GetMask() << " appears in " << this->blacklist.name; + XLine *x = akills->Add("*@" + user->host, Config->OperServ, Anope::CurTime + this->blacklist.bantime, reason); /* If AkillOnAdd is disabled send it anyway, noone wants bots around... */ if (!Config->AkillOnAdd) - ircdproto->SendAkill(user, x); + akills->Send(NULL, x); } else { - Log(operserv) << "DNSBL: " << user->GetMask() << " appears in " << this->blacklist.name << "(" << reason << ")"; - XLine xline(Anope::string("*@") + user->host, Config->OperServ, Anope::CurTime + this->blacklist.bantime, reason); - ircdproto->SendAkill(user, &xline); + XLine xline("*@" + user->host, Config->OperServ, Anope::CurTime + this->blacklist.bantime, reason); + ircdproto->SendAkill(NULL, &xline); } } }; |
