summaryrefslogtreecommitdiff
path: root/modules/extra/m_dnsbl.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-11-24 21:40:56 -0600
committerAdam <Adam@anope.org>2010-12-12 19:36:19 -0500
commitcb6ef574e3df5cc846247450b74ca37d265f319e (patch)
tree8ce3374a537c312af63c78125bfea4622bb188f0 /modules/extra/m_dnsbl.cpp
parent37e02a3594fdddc3d5a3df0501c528f42db6c4da (diff)
Send replies from fantasy commands back to the channel, this will be expanded on later
Diffstat (limited to 'modules/extra/m_dnsbl.cpp')
-rw-r--r--modules/extra/m_dnsbl.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/extra/m_dnsbl.cpp b/modules/extra/m_dnsbl.cpp
index a9351d35e..b363d3503 100644
--- a/modules/extra/m_dnsbl.cpp
+++ b/modules/extra/m_dnsbl.cpp
@@ -7,6 +7,12 @@
#include "module.h"
+struct FakeAkill : public Command
+{
+ FakeAkill() : Command("AKILL", 0, 0) { this->service = OperServ; }
+ CommandReturn Execute(CommandSource &, const std::vector<Anope::string> &) { return MOD_CONT; }
+} fake_akill;
+
struct Blacklist
{
Anope::string name;
@@ -56,9 +62,7 @@ class DNSBLResolver : public DNSRequest
XLine *x = NULL;
if (this->add_to_akill && SGLine && (x = SGLine->Add(NULL, NULL, Anope::string("*@") + user->host, Anope::CurTime + this->blacklist.bantime, reason)))
{
- static Command command_akill("AKILL", 0);
- command_akill.service = OperServ;
- Log(LOG_COMMAND, OperServ, &command_akill) << "for " << user->GetMask() << " (Listed in " << this->blacklist.name << ")";
+ Log(LOG_COMMAND, OperServ, &fake_akill) << "for " << user->GetMask() << " (Listed in " << this->blacklist.name << ")";
/* If AkillOnAdd is disabled send it anyway, noone wants bots around... */
if (!Config->AkillOnAdd)
ircdproto->SendAkill(x);