summaryrefslogtreecommitdiff
path: root/src/modes/cmode_o.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes/cmode_o.cpp')
-rw-r--r--src/modes/cmode_o.cpp45
1 files changed, 3 insertions, 42 deletions
diff --git a/src/modes/cmode_o.cpp b/src/modes/cmode_o.cpp
index 0a13b39ce..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 "modes/cmode_o.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<std::string> 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 &parameter, bool adding)
-{
- return MODEACTION_ALLOW;
+ prefixrank = OP_VALUE;
}