diff options
| author | 2023-01-24 23:41:50 +0000 | |
|---|---|---|
| committer | 2023-01-25 00:39:27 +0000 | |
| commit | af8effe4f0876d6fa934806745712f679bd36278 (patch) | |
| tree | b0d6de94d60dc5e116faa5e14b6029fb1c527886 /src/modules/m_connectban.cpp | |
| parent | Fix using (unsigned) long instead of (s)size_t. (diff) | |
Replace getInt/getUInt/getFloat with type safe templated functions.
Diffstat (limited to 'src/modules/m_connectban.cpp')
| -rw-r--r-- | src/modules/m_connectban.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp index e99c958ba..a65d8ab52 100644 --- a/src/modules/m_connectban.cpp +++ b/src/modules/m_connectban.cpp @@ -100,9 +100,9 @@ public: { const auto& tag = ServerInstance->Config->ConfValue("connectban"); - ipv4_cidr = static_cast<unsigned int>(tag->getUInt("ipv4cidr", ServerInstance->Config->c_ipv4_range, 1, 32)); - ipv6_cidr = static_cast<unsigned int>(tag->getUInt("ipv6cidr", ServerInstance->Config->c_ipv6_range, 1, 128)); - threshold = tag->getUInt("threshold", 10, 1); + ipv4_cidr = tag->getNum<unsigned int>("ipv4cidr", ServerInstance->Config->c_ipv4_range, 1, 32); + ipv6_cidr = tag->getNum<unsigned int>("ipv6cidr", ServerInstance->Config->c_ipv6_range, 1, 128); + threshold = tag->getNum<unsigned long>("threshold", 10, 1); bootwait = tag->getDuration("bootwait", 60*2); splitwait = tag->getDuration("splitwait", 60*2); banduration = tag->getDuration("banduration", 6*60*60, 1); |
