X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_rmode.cpp;h=8208041387a5495dded2262a0671890a54e7a48f;hb=7ba36f5348a6cca1c0da820c60ae17063f3cdad5;hp=feb17383dc4954cb4c33b8c8c290abb9e3aba5d2;hpb=8f5efbc7aa33b792e02d01e3288f553e6e98ccaa;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_rmode.cpp b/src/modules/m_rmode.cpp index feb17383d..820804138 100644 --- a/src/modules/m_rmode.cpp +++ b/src/modules/m_rmode.cpp @@ -1,6 +1,9 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2019 Robby + * Copyright (C) 2013-2014, 2016 Attila Molnar + * Copyright (C) 2013, 2017-2018 Sadie Powell * Copyright (C) 2013 Daniel Vassdal * * This file is part of InspIRCd. InspIRCd is free software: you can @@ -28,10 +31,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 +53,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 +73,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); } } @@ -103,7 +106,7 @@ class ModuleRMode : public Module Version GetVersion() CXX11_OVERRIDE { - return Version("Allows glob-based removal of list modes", VF_VENDOR); + return Version("Allows removal of channel list modes using glob patterns.", VF_VENDOR); } };