aboutsummaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-24 23:41:50 +0000
committerGravatar Sadie Powell2023-01-25 00:39:27 +0000
commitaf8effe4f0876d6fa934806745712f679bd36278 (patch)
treeb0d6de94d60dc5e116faa5e14b6029fb1c527886 /src/users.cpp
parentFix using (unsigned) long instead of (s)size_t. (diff)
Replace getInt/getUInt/getFloat with type safe templated functions.
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/users.cpp b/src/users.cpp
index cf2652403..e44e2bda3 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1091,20 +1091,20 @@ void ConnectClass::Configure(const std::string& classname, const std::shared_ptr
ports.insert(static_cast<in_port_t>(port));
}
- commandrate = tag->getUInt("commandrate", commandrate, 1);
+ commandrate = tag->getNum<unsigned long>("commandrate", commandrate, 1);
fakelag = tag->getBool("fakelag", fakelag);
- hardsendqmax = tag->getUInt("hardsendq", hardsendqmax, ServerInstance->Config->Limits.MaxLine);
- limit = tag->getUInt("limit", limit, 1);
- maxchans = tag->getUInt("maxchans", maxchans);
+ hardsendqmax = tag->getNum<unsigned long>("hardsendq", hardsendqmax, ServerInstance->Config->Limits.MaxLine);
+ limit = tag->getNum<unsigned long>("limit", limit, 1);
+ maxchans = tag->getNum<unsigned long>("maxchans", maxchans);
maxconnwarn = tag->getBool("maxconnwarn", maxconnwarn);
- maxlocal = tag->getUInt("localmax", maxlocal);
- maxglobal = tag->getUInt("globalmax", maxglobal, maxlocal);
- penaltythreshold = tag->getUInt("threshold", penaltythreshold, 1);
+ maxlocal = tag->getNum<unsigned long>("localmax", maxlocal);
+ maxglobal = tag->getNum<unsigned long>("globalmax", maxglobal, maxlocal);
+ penaltythreshold = tag->getNum<unsigned long>("threshold", penaltythreshold, 1);
pingtime = tag->getDuration("pingfreq", pingtime);
- recvqmax = tag->getUInt("recvq", recvqmax, ServerInstance->Config->Limits.MaxLine);
+ recvqmax = tag->getNum<unsigned long>("recvq", recvqmax, ServerInstance->Config->Limits.MaxLine);
connection_timeout = tag->getDuration("timeout", connection_timeout);
resolvehostnames = tag->getBool("resolvehostnames", resolvehostnames);
- softsendqmax = tag->getUInt("softsendq", softsendqmax, ServerInstance->Config->Limits.MaxLine);
+ softsendqmax = tag->getNum<unsigned long>("softsendq", softsendqmax, ServerInstance->Config->Limits.MaxLine);
uniqueusername = tag->getBool("uniqueusername", uniqueusername);
}