#include "inspircd.h"
#include "listmode.h"
-/* $ModDesc: Provides support for the RMODE command - Makes mass removal of chan listmodes by glob pattern possible */
-
/** Handle /RMODE
*/
class CommandRMode : public Command
if (!mh->IsListMode())
{
- if (chan->IsModeSet(modeletter))
+ if (chan->IsModeSet(mh))
modestack.Push(modeletter);
}
else if (((prefixrank = mh->GetPrefixRank()) && (prefixchar = mh->GetPrefix())))
stackresult.push_back(chan->name);
while (modestack.GetStackedLine(stackresult))
{
- ServerInstance->SendMode(stackresult, user);
+ ServerInstance->Modes->Process(stackresult, user);
stackresult.erase(stackresult.begin() + 1, stackresult.end());
}
public:
ModuleRMode() : cmd(this) { }
- void init()
+ void init() CXX11_OVERRIDE
{
ServerInstance->Modules->AddService(cmd);
}
- Version GetVersion()
+ Version GetVersion() CXX11_OVERRIDE
{
return Version("Allows glob-based removal of list modes", VF_VENDOR);
}