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_ojoin.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/modules/m_ojoin.cpp') diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp index 3710757aa..1444f93ad 100644 --- a/src/modules/m_ojoin.cpp +++ b/src/modules/m_ojoin.cpp @@ -65,18 +65,17 @@ class CommandOjoin : public SplitCommand } else { + channel = ServerInstance->FindChan(parameters[0]); + if (!channel) + return CMD_FAILURE; + ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used OJOIN in "+parameters[0]); // they're already in the channel - std::vector modes; - modes.push_back(parameters[0]); - modes.push_back(std::string("+") + npmh->GetModeChar()); + Modes::ChangeList changelist; + changelist.push_add(npmh, user->nick); if (op) - { - modes[1].push_back('o'); - modes.push_back(user->nick); - } - modes.push_back(user->nick); - ServerInstance->Modes->Process(modes, ServerInstance->FakeClient); + changelist.push_add(ServerInstance->Modes->FindMode('o', MODETYPE_CHANNEL), user->nick); + ServerInstance->Modes->Process(ServerInstance->FakeClient, channel, NULL, changelist); } return CMD_SUCCESS; } -- cgit v1.3.1-10-gc9f91