- ipv4_cidr = Conf.ReadInteger("connectban", "ipv4cidr", 0, true);
- if (ipv4_cidr == 0)
- ipv4_cidr = 32;
-
- ipv6_cidr = Conf.ReadInteger("connectban", "ipv6cidr", 0, true);
- if (ipv6_cidr == 0)
- ipv6_cidr = 128;
-
- threshold = Conf.ReadInteger("connectban", "threshold", 0, true);
-
- if (threshold == 0)
- threshold = 10;
-
- duration = Conf.ReadValue("connectban", "duration", 0, true);
-
- if (duration.empty())
- duration = "10m";
-
- banduration = ServerInstance->Duration(duration);
+ ipv4_cidr = tag->getInt("ipv4cidr", 32, 1, 32);
+ ipv6_cidr = tag->getInt("ipv6cidr", 128, 1, 128);
+ threshold = tag->getInt("threshold", 10, 1);
+ banduration = tag->getDuration("duration", 10*60, 1);