summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-06-18 21:26:54 +0200
committerPeter Powell <petpow@saberuk.com>2017-10-15 23:41:50 +0100
commitc65b5b4a1e2c88bde155fba9808315b3db291485 (patch)
treecc90fe807e973eb4409a86f6c27e7f8bf48fa307 /src
parent7306e354798c529a9fff0643c830897401e588d9 (diff)
Clean up the initialization of ConnectClass and ServerConfig.
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp10
-rw-r--r--src/users.cpp10
2 files changed, 5 insertions, 15 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index d198a1d84..3059b1dbb 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -62,17 +62,9 @@ ServerConfig::ServerConfig()
: EmptyTag(CreateEmptyTag())
, Limits(EmptyTag)
, Paths(EmptyTag)
+ , RawLog(false)
, NoSnoticeStack(false)
{
- RawLog = HideBans = HideSplits = false;
- WildcardIPv6 = true;
- MaxTargets = 20;
- NetBufferSize = 10240;
- MaxConn = SOMAXCONN;
- MaxChans = 20;
- OperMaxChans = 30;
- c_ipv4_range = 32;
- c_ipv6_range = 128;
}
ServerConfig::~ServerConfig()
diff --git a/src/users.cpp b/src/users.cpp
index 4945cbb21..5aede9312 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1172,13 +1172,11 @@ ConnectClass::ConnectClass(ConfigTag* tag, char t, const std::string& mask)
}
ConnectClass::ConnectClass(ConfigTag* tag, char t, const std::string& mask, const ConnectClass& parent)
- : config(tag), type(t), fakelag(parent.fakelag), name("unnamed"),
- registration_timeout(parent.registration_timeout), host(mask), pingtime(parent.pingtime),
- softsendqmax(parent.softsendqmax), hardsendqmax(parent.hardsendqmax), recvqmax(parent.recvqmax),
- penaltythreshold(parent.penaltythreshold), commandrate(parent.commandrate),
- maxlocal(parent.maxlocal), maxglobal(parent.maxglobal), maxconnwarn(parent.maxconnwarn), maxchans(parent.maxchans),
- limit(parent.limit), resolvehostnames(parent.resolvehostnames), ports(parent.ports)
{
+ Update(&parent);
+ name = "unnamed";
+ type = t;
+ config = tag;
}
void ConnectClass::Update(const ConnectClass* src)