From 17cc3b8490692ee3a225f052425deb43a45b98db Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 3 Nov 2009 17:12:36 +0000 Subject: Create m_halfop git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11997 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modes/cmode_h.cpp | 64 --------------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 src/modes/cmode_h.cpp (limited to 'src/modes') diff --git a/src/modes/cmode_h.cpp b/src/modes/cmode_h.cpp deleted file mode 100644 index 0b0f0b700..000000000 --- a/src/modes/cmode_h.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ - * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits - * - * This program is free but copyrighted software; see - * the file COPYING for details. - * - * --------------------------------------------------- - */ - -#include "inspircd.h" -#include "configreader.h" -#include "mode.h" -#include "channels.h" -#include "users.h" -#include "modules.h" -#include "modes/cmode_h.h" - -ModeChannelHalfOp::ModeChannelHalfOp() : ModeHandler(NULL, "halfop", 'h', PARAM_ALWAYS, MODETYPE_CHANNEL) -{ - list = true; - prefix = '%'; - levelrequired = OP_VALUE; - m_paramtype = TR_NICK; -} - -unsigned int ModeChannelHalfOp::GetPrefixRank() -{ - return HALFOP_VALUE; -} - -void ModeChannelHalfOp::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 parameters; - parameters.push_back(channel->name); - parameters.push_back("-h"); - parameters.push_back(i->first->nick); - ServerInstance->SendMode(parameters, ServerInstance->FakeClient); - } - } - -} - -void ModeChannelHalfOp::RemoveMode(User*, irc::modestacker* stack) -{ -} - -ModeAction ModeChannelHalfOp::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) -{ - return MODEACTION_ALLOW; -} -- cgit v1.2.3