aboutsummaryrefslogtreecommitdiffstats
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-11-24 20:54:33 +0000
committerGravatar Sadie Powell2021-11-24 20:54:33 +0000
commit42b7a77cc621f9363038d98a58ca52c20e0a7d3c (patch)
tree76050d920a95c8c30d0c7a81e99bd60602624991 /src/configreader.cpp
parentRemove the legacy sendq to hardsendq/softsendq logic. (diff)
Move configuration of connect classes to the ConnectClass class.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp34
1 files changed, 1 insertions, 33 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 74b8e98e1..2592cd1ed 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -247,39 +247,7 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current)
? std::make_shared<ConnectClass>(tag, type, masks, parent)
: std::make_shared<ConnectClass>(tag, type, masks);
- me->name = name;
-
- me->registration_timeout = tag->getDuration("timeout", me->registration_timeout);
- me->pingtime = tag->getDuration("pingfreq", me->pingtime);
- me->softsendqmax = tag->getUInt("softsendq", me->softsendqmax, ServerInstance->Config->Limits.MaxLine);
- me->hardsendqmax = tag->getUInt("hardsendq", me->hardsendqmax, ServerInstance->Config->Limits.MaxLine);
- me->recvqmax = tag->getUInt("recvq", me->recvqmax, ServerInstance->Config->Limits.MaxLine);
- me->penaltythreshold = tag->getUInt("threshold", me->penaltythreshold, 1);
- me->commandrate = tag->getUInt("commandrate", me->commandrate, 1);
- me->fakelag = tag->getBool("fakelag", me->fakelag);
- me->maxlocal = tag->getUInt("localmax", me->maxlocal, 1);
- me->maxglobal = tag->getUInt("globalmax", me->maxglobal, 1);
- me->maxchans = tag->getUInt("maxchans", me->maxchans);
- me->maxconnwarn = tag->getBool("maxconnwarn", me->maxconnwarn);
- me->limit = tag->getUInt("limit", me->limit, 1);
- me->resolvehostnames = tag->getBool("resolvehostnames", me->resolvehostnames);
- me->uniqueusername = tag->getBool("uniqueusername", me->uniqueusername);
- me->password = tag->getString("password", me->password);
-
- me->passwordhash = tag->getString("hash", me->passwordhash);
- if (!me->password.empty() && (me->passwordhash.empty() || stdalgo::string::equalsci(me->passwordhash, "plaintext")))
- {
- ServerInstance->Logs.Log("CONNECTCLASS", LOG_DEFAULT, "<connect> tag '%s' at %s contains an plain text password, this is insecure!",
- name.c_str(), tag->source.str().c_str());
- }
-
- std::string ports = tag->getString("port");
- if (!ports.empty())
- {
- irc::portparser portrange(ports, false);
- while (long port = portrange.GetToken())
- me->ports.insert(static_cast<int>(port));
- }
+ me->Configure(name, tag);
ClassMap::iterator oldMask = oldBlocksByMask.find(std::make_pair(me->name, me->type));
if (oldMask != oldBlocksByMask.end())