From 2e75491aed528e63a3b1bcbe76483e395f8c2506 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Thu, 24 Oct 2019 10:25:29 +0100 Subject: Fix respecting the deprecated tag. --- src/channels.cpp | 2 ++ src/users.cpp | 22 ++++++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'src') 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(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) { } -- cgit v1.2.3