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_channames.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/modules/m_channames.cpp') diff --git a/src/modules/m_channames.cpp b/src/modules/m_channames.cpp index 1fb5b2a40..7513cb33a 100644 --- a/src/modules/m_channames.cpp +++ b/src/modules/m_channames.cpp @@ -64,6 +64,8 @@ class ModuleChannelNames : public Module void ValidateChans() { + Modes::ChangeList removepermchan; + badchan = true; const chan_hash& chans = ServerInstance->GetChans(); for (chan_hash::const_iterator i = chans.begin(); i != chans.end(); ) @@ -76,12 +78,11 @@ class ModuleChannelNames : public Module if (c->IsModeSet(permchannelmode) && c->GetUserCounter()) { - std::vector modes; - modes.push_back(c->name); - modes.push_back(std::string("-") + permchannelmode->GetModeChar()); - - ServerInstance->Modes->Process(modes, ServerInstance->FakeClient); + removepermchan.clear(); + removepermchan.push_remove(*permchannelmode); + ServerInstance->Modes->Process(ServerInstance->FakeClient, c, NULL, removepermchan); } + Channel::MemberMap& users = c->userlist; for (Channel::MemberMap::iterator j = users.begin(); j != users.end(); ) { -- cgit v1.3.1-10-gc9f91