summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp2
-rw-r--r--src/users.cpp22
2 files changed, 20 insertions, 4 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index befc1f133..282199718 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -176,6 +176,8 @@ Channel* Channel::JoinUser(LocalUser* user, std::string cname, bool override, co
if (!override)
{
unsigned int maxchans = user->GetClass()->maxchans;
+ if (!maxchans)
+ maxchans = ServerInstance->Config->MaxChans;
if (user->IsOper())
{
unsigned int opermaxchans = ConvToNum<unsigned int>(user->oper->getConfig("maxchans"));
diff --git a/src/users.cpp b/src/users.cpp
index 69def5154..bca1c6a7c 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1197,10 +1197,24 @@ const std::string& FakeUser::GetFullRealHost()
}
ConnectClass::ConnectClass(ConfigTag* tag, char t, const std::string& mask)
- : config(tag), type(t), fakelag(true), name("unnamed"), registration_timeout(0), host(mask),
- pingtime(0), softsendqmax(0), hardsendqmax(0), recvqmax(0),
- penaltythreshold(0), commandrate(0), maxlocal(0), maxglobal(0), maxconnwarn(true), maxchans(ServerInstance->Config->MaxChans),
- limit(0), resolvehostnames(true)
+ : config(tag)
+ , type(t)
+ , fakelag(true)
+ , name("unnamed")
+ , registration_timeout(0)
+ , host(mask)
+ , pingtime(0)
+ , softsendqmax(0)
+ , hardsendqmax(0)
+ , recvqmax(0)
+ , penaltythreshold(0)
+ , commandrate(0)
+ , maxlocal(0)
+ , maxglobal(0)
+ , maxconnwarn(true)
+ , maxchans(0)
+ , limit(0)
+ , resolvehostnames(true)
{
}