]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/channels.cpp
Replace the deprecated MAXBANS token with MAXLIST.
[user/henk/code/inspircd.git] / src / channels.cpp
index a757cdc5a34d6e265ea23f3ca3f01104b28b03aa..bc23c680a07b309a83de482bc29ef7c1ed18dd93 100644 (file)
@@ -181,7 +181,7 @@ Channel* Channel::JoinUser(LocalUser* user, std::string cname, bool override, co
                {
                        unsigned int opermaxchans = ConvToInt(user->oper->getConfig("maxchans"));
                        // If not set, use 2.0's <channels:opers>, if that's not set either, use limit from CC
-                       if (!opermaxchans)
+                       if (!opermaxchans && user->HasPrivPermission("channels/high-join-limit"))
                                opermaxchans = ServerInstance->Config->OperMaxChans;
                        if (opermaxchans)
                                maxchans = opermaxchans;
@@ -611,20 +611,17 @@ unsigned int Membership::getRank()
        return rv;
 }
 
-const char* Membership::GetAllPrefixChars() const
+std::string Membership::GetAllPrefixChars() const
 {
-       static char prefix[64];
-       int ctr = 0;
-
+       std::string ret;
        for (std::string::const_iterator i = modes.begin(); i != modes.end(); ++i)
        {
                PrefixMode* mh = ServerInstance->Modes->FindPrefixMode(*i);
                if (mh && mh->GetPrefix())
-                       prefix[ctr++] = mh->GetPrefix();
+                       ret.push_back(mh->GetPrefix());
        }
-       prefix[ctr] = 0;
 
-       return prefix;
+       return ret;
 }
 
 unsigned int Channel::GetPrefixValue(User* user)