- e->name = MyConf->ReadValue("dnsbl", "name", i);
- e->reason = MyConf->ReadValue("dnsbl", "reason", i);
- e->domain = MyConf->ReadValue("dnsbl", "domain", i);
- e->banaction = str2banaction(MyConf->ReadValue("dnsbl", "action", i));
- e->duration = ServerInstance->Duration(MyConf->ReadValue("dnsbl", "duration", i).c_str());
- e->bitmask = MyConf->ReadInteger("dnsbl", "bitmask", i, false);
+ e->name = tag->getString("name");
+ e->ident = tag->getString("ident");
+ e->host = tag->getString("host");
+ e->reason = tag->getString("reason");
+ e->domain = tag->getString("domain");
+
+ if (tag->getString("type") == "bitmask")
+ {
+ e->type = DNSBLConfEntry::A_BITMASK;
+ e->bitmask = tag->getInt("bitmask");
+ }
+ else
+ {
+ memset(e->records, 0, sizeof(e->records));
+ e->type = DNSBLConfEntry::A_RECORD;
+ irc::portparser portrange(tag->getString("records"), false);
+ long item = -1;
+ while ((item = portrange.GetToken()))
+ e->records[item] = 1;
+ }
+
+ e->banaction = str2banaction(tag->getString("action"));
+ e->duration = tag->getDuration("duration", 60, 1);
+
+ /* Use portparser for record replies */