diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-09-01 14:25:15 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-09-11 12:10:07 +0200 |
commit | 34fa5627de0a0431ca76f34445c680a76a9a7dc5 (patch) | |
tree | 4b63f6ce49983e161051f70e066ecf9bf974cc88 /src/modes | |
parent | 537ad4740afdbc656326cce766d1818cf5811c37 (diff) |
Create a base class for prefix modes
Move Channel::SetPrefix() into Membership
Diffstat (limited to 'src/modes')
-rw-r--r-- | src/modes/cmode_o.cpp | 9 | ||||
-rw-r--r-- | src/modes/cmode_v.cpp | 9 |
2 files changed, 2 insertions, 16 deletions
diff --git a/src/modes/cmode_o.cpp b/src/modes/cmode_o.cpp index d500f23b1..6e96afa67 100644 --- a/src/modes/cmode_o.cpp +++ b/src/modes/cmode_o.cpp @@ -28,16 +28,9 @@ #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; prefixrank = OP_VALUE; } - -ModeAction ModeChannelOp::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) -{ - return MODEACTION_ALLOW; -} diff --git a/src/modes/cmode_v.cpp b/src/modes/cmode_v.cpp index fe62c407f..c8ce30ab1 100644 --- a/src/modes/cmode_v.cpp +++ b/src/modes/cmode_v.cpp @@ -28,16 +28,9 @@ #include "modules.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; prefixrank = VOICE_VALUE; } - -ModeAction ModeChannelVoice::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) -{ - return MODEACTION_ALLOW; -} |