1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2010 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
15 #include "configreader.h"
20 #include "modes/cmode_o.h"
22 ModeChannelOp::ModeChannelOp() : ModeHandler(NULL, "op", 'o', PARAM_ALWAYS, MODETYPE_CHANNEL)
26 levelrequired = OP_VALUE;
27 m_paramtype = TR_NICK;
30 unsigned int ModeChannelOp::GetPrefixRank()
35 void ModeChannelOp::RemoveMode(Channel* channel, irc::modestacker* stack)
37 const UserMembList* clist = channel->GetUsers();
39 for (UserMembCIter i = clist->begin(); i != clist->end(); i++)
42 stack->Push(this->GetModeChar(), i->first->nick);
45 std::vector<std::string> parameters;
46 parameters.push_back(channel->name);
47 parameters.push_back("-o");
48 parameters.push_back(i->first->nick);
49 ServerInstance->SendMode(parameters, ServerInstance->FakeClient);
54 void ModeChannelOp::RemoveMode(User*, irc::modestacker* stack)
58 ModeAction ModeChannelOp::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding)
60 return MODEACTION_ALLOW;