Fix using the oper channel limit even if it is lower than the general limit.

This commit is contained in:
Sadie Powell 2022-01-15 22:35:43 +00:00
parent b52983b268
commit 3f184e79d4

View File

@ -186,7 +186,7 @@ Channel* Channel::JoinUser(LocalUser* user, std::string cname, bool override, co
// If not set, use 2.0's <channels:opers>, if that's not set either, use limit from CC
if (!opermaxchans && user->HasPrivPermission("channels/high-join-limit"))
opermaxchans = ServerInstance->Config->OperMaxChans;
if (opermaxchans)
if (opermaxchans < maxchans)
maxchans = opermaxchans;
}
if (user->chans.size() >= maxchans)