From b57c0342cab22f9872dabaa8eff76ce5c8b9a890 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Thu, 6 Jun 2013 03:10:10 +0200 Subject: Store prefix rank in a ModeHandler field, change ModeHandler::GetPrefixRank() to be non-virtual --- src/modes/cmode_o.cpp | 6 +----- src/modes/cmode_v.cpp | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'src/modes') diff --git a/src/modes/cmode_o.cpp b/src/modes/cmode_o.cpp index f0a729480..d500f23b1 100644 --- a/src/modes/cmode_o.cpp +++ b/src/modes/cmode_o.cpp @@ -34,11 +34,7 @@ ModeChannelOp::ModeChannelOp() : ModeHandler(NULL, "op", 'o', PARAM_ALWAYS, MODE prefix = '@'; levelrequired = OP_VALUE; m_paramtype = TR_NICK; -} - -unsigned int ModeChannelOp::GetPrefixRank() -{ - return OP_VALUE; + prefixrank = OP_VALUE; } ModeAction ModeChannelOp::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) diff --git a/src/modes/cmode_v.cpp b/src/modes/cmode_v.cpp index 867c13243..fe62c407f 100644 --- a/src/modes/cmode_v.cpp +++ b/src/modes/cmode_v.cpp @@ -34,11 +34,7 @@ ModeChannelVoice::ModeChannelVoice() : ModeHandler(NULL, "voice", 'v', PARAM_ALW prefix = '+'; levelrequired = HALFOP_VALUE; m_paramtype = TR_NICK; -} - -unsigned int ModeChannelVoice::GetPrefixRank() -{ - return VOICE_VALUE; + prefixrank = VOICE_VALUE; } ModeAction ModeChannelVoice::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) -- cgit v1.2.3