X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fcmode_o.cpp;h=496a327185fec9271d50f4af38a234a617d3d771;hb=82435b6fa8805baa65e04a582f3e4a2c84237f73;hp=ff57e177a5a37a9df870fbd29aa4d6370894263e;hpb=1bf6cf727da706d821bc4cf84055e27be5ed7f7c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/cmode_o.cpp b/src/modes/cmode_o.cpp index ff57e177a..496a32718 100644 --- a/src/modes/cmode_o.cpp +++ b/src/modes/cmode_o.cpp @@ -21,50 +21,11 @@ #include "inspircd.h" -#include "configreader.h" -#include "mode.h" -#include "channels.h" -#include "users.h" -#include "modules.h" #include "builtinmodes.h" -ModeChannelOp::ModeChannelOp() : ModeHandler(NULL, "op", 'o', PARAM_ALWAYS, MODETYPE_CHANNEL) +ModeChannelOp::ModeChannelOp() : PrefixMode(NULL, "op", 'o') { - list = true; prefix = '@'; levelrequired = OP_VALUE; - m_paramtype = TR_NICK; -} - -unsigned int ModeChannelOp::GetPrefixRank() -{ - return OP_VALUE; -} - -void ModeChannelOp::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("-o"); - parameters.push_back(i->first->nick); - ServerInstance->SendMode(parameters, ServerInstance->FakeClient); - } - } -} - -void ModeChannelOp::RemoveMode(User*, irc::modestacker* stack) -{ -} - -ModeAction ModeChannelOp::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) -{ - return MODEACTION_ALLOW; + prefixrank = OP_VALUE; }