summaryrefslogtreecommitdiff
path: root/src/modules/m_rmode.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-09-03 15:32:02 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-09-03 15:32:02 +0200
commit4634151efc02ff016e19c5f123d75824d0d6c811 (patch)
tree5fc364f465a5b68dd3bcb3098738de55734ca971 /src/modules/m_rmode.cpp
parentf55703b2fb7590333d06008add5294a6bd711339 (diff)
Replace irc::modestacker usage with the new ModeParser::Process()
Diffstat (limited to 'src/modules/m_rmode.cpp')
-rw-r--r--src/modules/m_rmode.cpp17
1 files changed, 5 insertions, 12 deletions
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;
}
};