From 4634151efc02ff016e19c5f123d75824d0d6c811 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Wed, 3 Sep 2014 15:32:02 +0200 Subject: Replace irc::modestacker usage with the new ModeParser::Process() --- src/modules/m_autoop.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/modules/m_autoop.cpp') 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 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); } } -- cgit v1.3.1-10-gc9f91