+ ConfigTag* tag = i->second;
+ reference<DNSBLConfEntry> e = new DNSBLConfEntry();
+
+ 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 (stdalgo::string::equalsci(tag->getString("type"), "bitmask"))
+ {
+ e->type = DNSBLConfEntry::A_BITMASK;
+ e->bitmask = tag->getUInt("bitmask", 0, 0, UINT_MAX);
+ }
+ 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);