]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_autoop.cpp
Merge branch 'insp20' into master.
[user/henk/code/inspircd.git] / src / modules / m_autoop.cpp
index 8c7f300daba11b60cbcbd85d79de719edf69e425..3eab189f28cabb43115fae07715e0ef66f95928e 100644 (file)
@@ -28,7 +28,7 @@ class AutoOpList : public ListModeBase
  public:
        AutoOpList(Module* Creator) : ListModeBase(Creator, "autoop", 'w', "End of Channel Access List", 910, 911, true)
        {
-               levelrequired = OP_VALUE;
+               ranktoset = ranktounset = OP_VALUE;
                tidy = false;
        }
 
@@ -41,7 +41,7 @@ class AutoOpList : public ListModeBase
                return mh ? mh->IsPrefixMode() : NULL;
        }
 
-       ModResult AccessCheck(User* source, Channel* channel, std::string &parameter, bool adding)
+       ModResult AccessCheck(User* source, Channel* channel, std::string &parameter, bool adding) CXX11_OVERRIDE
        {
                std::string::size_type pos = parameter.find(':');
                if (pos == 0 || pos == std::string::npos)
@@ -61,7 +61,7 @@ class AutoOpList : public ListModeBase
                std::string dummy;
                if (mh->AccessCheck(source, channel, dummy, true) == MOD_RES_DENY)
                        return MOD_RES_DENY;
-               if (mh->GetLevelRequired() > mylevel)
+               if (mh->GetLevelRequired(true) > mylevel)
                {
                        source->WriteNumeric(ERR_CHANOPRIVSNEEDED, channel->name, InspIRCd::Format("You must be able to set mode '%s' to include it in an autoop", mid.c_str()));
                        return MOD_RES_DENY;