- 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->getUInt("ipv4cidr", 32, 1, 32);
+ ipv6_cidr = tag->getUInt("ipv6cidr", 128, 1, 128);
+ threshold = tag->getUInt("threshold", 10, 1);
+ banduration = tag->getDuration("duration", 10*60, 1);
+ banmessage = tag->getString("banmessage", "Your IP range has been attempting to connect too many times in too short a duration. Wait a while, and you will be able to connect.");