From d649d42c00ab8ca398d9d410050258180ed51f63 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 16 Jan 2023 06:02:58 +0000 Subject: Move enforcing channel join limits to core_channel. --- src/channels.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'src/channels.cpp') diff --git a/src/channels.cpp b/src/channels.cpp index 37b487c28..bc8b9b3a7 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -29,12 +29,6 @@ #include "clientprotocolevent.h" #include "listmode.h" -enum -{ - // From RFC 1459. - ERR_TOOMANYCHANNELS = 405, -}; - namespace { ChanModeReference ban(nullptr, "ban"); @@ -178,25 +172,6 @@ Channel* Channel::JoinUser(LocalUser* user, std::string cname, bool override, co return nullptr; } - /* - * We don't restrict the number of channels that remote users or users that are override-joining may be in. - * We restrict local users to channels. - * We restrict local operators to channels. - * This is a lot more logical than how it was formerly. -- w00t - */ - if (!override) - { - unsigned long maxchans = user->GetClass()->maxchans; - if (user->IsOper()) - maxchans = user->oper->GetConfig()->getUInt("maxchans", maxchans, maxchans); - - if (user->chans.size() >= maxchans) - { - user->WriteNumeric(ERR_TOOMANYCHANNELS, cname, "You are on too many channels"); - return nullptr; - } - } - // Crop channel name if it's too long if (cname.length() > ServerInstance->Config->Limits.MaxChannel) cname.resize(ServerInstance->Config->Limits.MaxChannel); -- cgit v1.3.1-10-gc9f91