]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/channels.cpp
/who tidyup - needs QA'ing
[user/henk/code/inspircd.git] / src / channels.cpp
index 5383f4aba2b39bed9cd95514896594a574641b17..366169dd635b068e782394b2267377f2839a70b4 100644 (file)
@@ -296,22 +296,22 @@ chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bo
        }
 
        /* NOTE: If the user is an oper here, we can extend their user->chans by up to
-        * OPERMAXCHANS. For remote users which are not bound by the channel limits,
-        * we can extend infinitely. Otherwise, nope, youre restricted to MAXCHANS.
+        * OperMaxchans. For remote users which are not bound by the channel limits,
+        * we can extend infinitely. Otherwise, nope, youre restricted to MaxChans.
         */
-       if (!IS_LOCAL(user) || override == true) /* was a check on fd < 0 */
+       if (!IS_LOCAL(user) || override == true)
        {
                return chanrec::ForceChan(Instance, Ptr, user, privs);
        }
        else if (*user->oper)
        {
-               /* Oper allows extension up to the OPERMAXCHANS value */
-               if (user->chans.size() < OPERMAXCHANS)
+               /* Oper allows extension up to the OperMaxchans value */
+               if (user->chans.size() < Instance->Config->OperMaxChans)
                {
                        return chanrec::ForceChan(Instance, Ptr, user, privs);
                }
        }
-       else if (user->chans.size() < MAXCHANS)
+       else if (user->chans.size() < Instance->Config->MaxChans)
        {
                return chanrec::ForceChan(Instance, Ptr, user, privs);
        }