X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_dnsbl.cpp;h=5e02dd0a5dadc5cea64d99375285f24a5a8bb5e6;hb=ac705cd20e12f46bd638093f000dfd541ffc5d22;hp=3a334ea371a36dedb1cd2e17aaea1150e237aad4;hpb=f1a122b4eeed9e681f3ef4cf94f8f710cc050afd;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 3a334ea37..5e02dd0a5 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -240,7 +240,7 @@ class ModuleDNSBL : public Module ServerInstance->Modules->AddService(nameExt); ServerInstance->Modules->AddService(countExt); Implementation eventlist[] = { I_OnRehash, I_OnSetUserIP, I_OnStats, I_OnSetConnectClass, I_OnCheckReady }; - ServerInstance->Modules->Attach(eventlist, this, 5); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual ~ModuleDNSBL() @@ -375,6 +375,8 @@ class ModuleDNSBL : public Module snprintf(reversedipbuf, 128, "%d.%d.%d.%d", d, c, b, a); reversedip = std::string(reversedipbuf); + countExt.set(user, DNSBLConfEntries.size()); + // For each DNSBL, we will run through this lookup unsigned int i = 0; while (i < DNSBLConfEntries.size()) @@ -386,9 +388,10 @@ class ModuleDNSBL : public Module bool cached; DNSBLResolver *r = new DNSBLResolver(this, nameExt, countExt, hostname, user, DNSBLConfEntries[i], cached); ServerInstance->AddResolver(r, cached); + if (user->quitting) + break; i++; } - countExt.set(user, i); } ModResult OnSetConnectClass(LocalUser* user, ConnectClass* myclass)