X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_rmode.cpp;h=7db988b607e5adac91e422f213efc25e0d2b0d48;hb=4e3d655dff6f8a5aed626475fbf19c2a7119c20b;hp=feb17383dc4954cb4c33b8c8c290abb9e3aba5d2;hpb=b9e11915a976daaf790ebc763aff56e19fd49e0f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_rmode.cpp b/src/modules/m_rmode.cpp index feb17383d..7db988b60 100644 --- a/src/modules/m_rmode.cpp +++ b/src/modules/m_rmode.cpp @@ -28,10 +28,10 @@ class CommandRMode : public Command CommandRMode(Module* Creator) : Command(Creator,"RMODE", 2, 3) { allow_empty_last_param = false; - syntax = " [pattern]"; + syntax = " []"; } - CmdResult Handle(const std::vector ¶meters, User *user) + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE { ModeHandler* mh; Channel* chan = ServerInstance->FindChan(parameters[0]); @@ -50,7 +50,7 @@ class CommandRMode : public Command return CMD_FAILURE; } - if (chan->GetPrefixValue(user) < mh->GetLevelRequired()) + if (chan->GetPrefixValue(user) < mh->GetLevelRequired(false)) { user->WriteNotice("You do not have access to unset " + ConvToStr(modeletter) + " on " + chan->name + "."); return CMD_FAILURE; @@ -70,7 +70,7 @@ class CommandRMode : public Command { if (!InspIRCd::Match(it->first->nick, pattern)) continue; - if (it->second->hasMode(modeletter) && !((it->first == user) && (pm->GetPrefixRank() > VOICE_VALUE))) + if (it->second->HasMode(pm) && !((it->first == user) && (pm->GetPrefixRank() > VOICE_VALUE))) changelist.push_remove(mh, it->first->nick); } }