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