]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/cmode_v.cpp
Change allocation of InspIRCd::BanCache to be physically part of the object containing it
[user/henk/code/inspircd.git] / src / modes / cmode_v.cpp
index 4a00f60f1804818574818201e0071fe0b3a41e34..c8ce30ab10b1021a433211a522be66b95833775d 100644 (file)
 #include "channels.h"
 #include "users.h"
 #include "modules.h"
-#include "modes/cmode_v.h"
+#include "builtinmodes.h"
 
-ModeChannelVoice::ModeChannelVoice() : ModeHandler(NULL, "voice", 'v', PARAM_ALWAYS, MODETYPE_CHANNEL)
+ModeChannelVoice::ModeChannelVoice() : PrefixMode(NULL, "voice", 'v')
 {
-       list = true;
        prefix = '+';
        levelrequired = HALFOP_VALUE;
-       m_paramtype = TR_NICK;
-}
-
-unsigned int ModeChannelVoice::GetPrefixRank()
-{
-       return VOICE_VALUE;
-}
-
-void ModeChannelVoice::RemoveMode(Channel* channel, irc::modestacker* stack)
-{
-       const UserMembList* clist = channel->GetUsers();
-
-       for (UserMembCIter i = clist->begin(); i != clist->end(); i++)
-       {
-               if (stack)
-                       stack->Push(this->GetModeChar(), i->first->nick);
-               else
-               {
-                       std::vector<std::string> parameters;
-                       parameters.push_back(channel->name);
-                       parameters.push_back("-v");
-                       parameters.push_back(i->first->nick);
-                       ServerInstance->SendMode(parameters, ServerInstance->FakeClient);
-               }
-       }
-}
-
-void ModeChannelVoice::RemoveMode(User*, irc::modestacker* stack)
-{
-}
-
-ModeAction ModeChannelVoice::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding)
-{
-       return MODEACTION_ALLOW;
+       prefixrank = VOICE_VALUE;
 }