X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_rmode.cpp;h=feb17383dc4954cb4c33b8c8c290abb9e3aba5d2;hb=3a3ff949670c61a4a8856e1391222e156eb1cd17;hp=c81fbd7e7f15f9a0c61f58740436481c13fe7361;hpb=325beda3540fdd8f8e13f90866a372d07ec71620;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_rmode.cpp b/src/modules/m_rmode.cpp index c81fbd7e7..feb17383d 100644 --- a/src/modules/m_rmode.cpp +++ b/src/modules/m_rmode.cpp @@ -60,7 +60,7 @@ class CommandRMode : public Command PrefixMode* pm; ListModeBase* lm; ListModeBase::ModeList* ml; - irc::modestacker modestack(false); + Modes::ChangeList changelist; if ((pm = mh->IsPrefixMode())) { @@ -71,7 +71,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))) - modestack.Push(modeletter, it->first->nick); + changelist.push_remove(mh, it->first->nick); } } else if ((lm = mh->IsListModeBase()) && ((ml = lm->GetList(chan)) != NULL)) @@ -80,23 +80,16 @@ class CommandRMode : public Command { if (!InspIRCd::Match(it->mask, pattern)) continue; - modestack.Push(modeletter, it->mask); + changelist.push_remove(mh, it->mask); } } else { if (chan->IsModeSet(mh)) - modestack.Push(modeletter); - } - - parameterlist stackresult; - stackresult.push_back(chan->name); - while (modestack.GetStackedLine(stackresult)) - { - ServerInstance->Modes->Process(stackresult, user); - stackresult.erase(stackresult.begin() + 1, stackresult.end()); + changelist.push_remove(mh); } + ServerInstance->Modes->Process(user, chan, NULL, changelist); return CMD_SUCCESS; } };