- // reversedip will created in there
- while (tempip.length()>0)
- {
- unsigned int lastdot=tempip.rfind(".");
- if (lastdot == std::string::npos)
- {
- reversedip+=tempip;
- tempip.clear();
- }
- else
- {
- reversedip += tempip.substr(lastdot+1,tempip.length()-lastdot+1);
- reversedip += ".";
- tempip.resize(lastdot);
- }
- }
-*/
-
- // For each DNSBL, we will run through this lookup
- for (std::vector<DNSBLConfEntry *>::iterator i = DNSBLConfEntries.begin(); i != DNSBLConfEntries.end(); i++)
- {
- // Fill hostname with a dnsbl style host (d.c.b.a.domain.tld)
- std::string hostname=reversedip+"."+ (*i)->domain;
-
- ServerInstance->Log(DEBUG, "m_dnsbl: sending %s for resolution", hostname.c_str());
-
- /* now we'd need to fire off lookups for `hostname'. */
- DNSBLResolver *r = new DNSBLResolver(this, ServerInstance, hostname, user, user->GetFd(), *i);
- ServerInstance->AddResolver(r);
- }
+ // For each DNSBL, we will run through this lookup
+ unsigned int i = 0;
+ while (i < DNSBLConfEntries.size())
+ {
+ // Fill hostname with a dnsbl style host (d.c.b.a.domain.tld)
+ std::string hostname = reversedip + "." + DNSBLConfEntries[i]->domain;
+
+ /* now we'd need to fire off lookups for `hostname'. */
+ bool cached;
+ DNSBLResolver *r = new DNSBLResolver(this, nameExt, countExt, hostname, user, DNSBLConfEntries[i], cached);
+ ServerInstance->AddResolver(r, cached);
+ i++;