diff options
author | Peter Powell <petpow@saberuk.com> | 2019-10-24 10:25:29 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-10-24 15:56:20 +0100 |
commit | 2e75491aed528e63a3b1bcbe76483e395f8c2506 (patch) | |
tree | 96bf5efb9c49bb7f9360f4697ada8e5ef1d51d65 /src | |
parent | 2998a2251c1783d99f27a5c4aa9c7ad6e729e2e5 (diff) |
Fix respecting the deprecated <channels:users> tag.
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 2 | ||||
-rw-r--r-- | src/users.cpp | 22 |
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) { } |