diff options
author | Adam <Adam@anope.org> | 2011-10-22 11:21:21 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-10-22 11:21:21 -0400 |
commit | c8b3809fc93bfcccb354248c17467da9b69e0ebd (patch) | |
tree | 68f2efa54b2ac5a949dcf1da7d03269ab26ad7df /modules/extra | |
parent | ad2ef75cbed4804f9f1d24419b9bc77fbe75a27a (diff) |
Added akill ids
Diffstat (limited to 'modules/extra')
-rw-r--r-- | modules/extra/m_dnsbl.cpp | 11 | ||||
-rw-r--r-- | modules/extra/m_proxyscan.cpp | 13 |
2 files changed, 11 insertions, 13 deletions
diff --git a/modules/extra/m_dnsbl.cpp b/modules/extra/m_dnsbl.cpp index 894eebb8a..4be489aa7 100644 --- a/modules/extra/m_dnsbl.cpp +++ b/modules/extra/m_dnsbl.cpp @@ -63,17 +63,16 @@ class DNSBLResolver : public DNSRequest BotInfo *operserv = findbot(Config->OperServ); Log(operserv) << "DNSBL: " << user->GetMask() << " appears in " << this->blacklist.name; + XLine *x = new XLine("*@" + user->host, Config->OperServ, Anope::CurTime + this->blacklist.bantime, reason, XLineManager::GenerateUID()); if (this->add_to_akill && akills) { - 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) - akills->Send(NULL, x); + akills->AddXLine(x); + akills->Send(NULL, x); } else { - XLine xline("*@" + user->host, Config->OperServ, Anope::CurTime + this->blacklist.bantime, reason); - ircdproto->SendAkill(NULL, &xline); + ircdproto->SendAkill(NULL, x); + delete x; } } }; diff --git a/modules/extra/m_proxyscan.cpp b/modules/extra/m_proxyscan.cpp index 1964e6bf0..685d984b0 100644 --- a/modules/extra/m_proxyscan.cpp +++ b/modules/extra/m_proxyscan.cpp @@ -86,20 +86,19 @@ class ProxyConnect : public ConnectionSocket reason = reason.replace_all_cs("%p", stringify(this->conaddr.port())); Log(findbot(Config->OperServ)) << "PROXYSCAN: Open " << this->GetType() << " proxy found on " << this->conaddr.addr() << ":" << this->conaddr.port() << " (" << reason << ")"; + XLine *x = new XLine("*@" + this->conaddr.addr(), Config->OperServ, Anope::CurTime + this->proxy.duration, reason, XLineManager::GenerateUID()); if (add_to_akill && akills) { - XLine *x = akills->Add("*@" + this->conaddr.addr(), Config->OperServ, Anope::CurTime + this->proxy.duration, reason); - /* If AkillOnAdd is disabled send it anyway, noone wants bots around... */ - if (!Config->AkillOnAdd) - akills->Send(NULL, x); + akills->AddXLine(x); + akills->Send(NULL, x); } else { - XLine xline("*@" + this->conaddr.addr(), Config->OperServ, Anope::CurTime + this->proxy.duration, reason); if (ircd->szline) - ircdproto->SendSZLine(NULL, &xline); + ircdproto->SendSZLine(NULL, x); else - ircdproto->SendAkill(NULL, &xline); + ircdproto->SendAkill(NULL, x); + delete x; } } }; |