2 /* +------------------------------------+
3 * | Inspire Internet Relay Chat Daemon |
4 * +------------------------------------+
6 * InspIRCd: (C) 2002-2010 InspIRCd Development Team
7 * See: http://wiki.inspircd.org/Credits
9 * This program is free but copyrighted software; see
10 * the file COPYING for details.
12 * ---------------------------------------------------
16 #include "configreader.h"
21 #include "modes/cmode_v.h"
23 ModeChannelVoice::ModeChannelVoice() : ModeHandler(NULL, "voice", 'v', PARAM_ALWAYS, MODETYPE_CHANNEL)
27 levelrequired = HALFOP_VALUE;
28 m_paramtype = TR_NICK;
31 unsigned int ModeChannelVoice::GetPrefixRank()
36 void ModeChannelVoice::RemoveMode(Channel* channel, irc::modestacker* stack)
38 const UserMembList* clist = channel->GetUsers();
40 for (UserMembCIter i = clist->begin(); i != clist->end(); i++)
43 stack->Push(this->GetModeChar(), i->first->nick);
46 std::vector<std::string> parameters;
47 parameters.push_back(channel->name);
48 parameters.push_back("-v");
49 parameters.push_back(i->first->nick);
50 ServerInstance->SendMode(parameters, ServerInstance->FakeClient);
55 void ModeChannelVoice::RemoveMode(User*, irc::modestacker* stack)
59 ModeAction ModeChannelVoice::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding)
61 return MODEACTION_ALLOW;