summaryrefslogtreecommitdiff
path: root/src/modules/m_autoop.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_autoop.cpp
parentf55703b2fb7590333d06008add5294a6bd711339 (diff)
Replace irc::modestacker usage with the new ModeParser::Process()
Diffstat (limited to 'src/modules/m_autoop.cpp')
-rw-r--r--src/modules/m_autoop.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/modules/m_autoop.cpp b/src/modules/m_autoop.cpp
index 828bef14c..801cf6c74 100644
--- a/src/modules/m_autoop.cpp
+++ b/src/modules/m_autoop.cpp
@@ -89,9 +89,7 @@ class ModuleAutoOp : public Module
ListModeBase::ModeList* list = mh.GetList(memb->chan);
if (list)
{
- std::string modeline("+");
- std::vector<std::string> modechange;
- modechange.push_back(memb->chan->name);
+ Modes::ChangeList changelist;
for (ListModeBase::ModeList::iterator it = list->begin(); it != list->end(); it++)
{
std::string::size_type colon = it->mask.find(':');
@@ -101,14 +99,10 @@ class ModuleAutoOp : public Module
{
PrefixMode* given = mh.FindMode(it->mask.substr(0, colon));
if (given)
- modeline.push_back(given->GetModeChar());
+ changelist.push_add(given, memb->user->nick);
}
}
- modechange.push_back(modeline);
- for(std::string::size_type i = modeline.length(); i > 1; --i) // we use "i > 1" instead of "i" so we skip the +
- modechange.push_back(memb->user->nick);
- if(modechange.size() >= 3)
- ServerInstance->Modes->Process(modechange, ServerInstance->FakeClient);
+ ServerInstance->Modes->Process(ServerInstance->FakeClient, memb->chan, NULL, changelist);
}
}