]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_delaymsg.cpp
Add the override keyword in places that it is missing.
[user/henk/code/inspircd.git] / src / modules / m_delaymsg.cpp
index f64297e15b8c678ce29d0969b8583400175e2ebf..247630e65e4a6e2d19186ace07144ad19ea155f9 100644 (file)
@@ -27,15 +27,15 @@ class DelayMsgMode : public ParamMode<DelayMsgMode, LocalIntExt>
                : ParamMode<DelayMsgMode, LocalIntExt>(Parent, "delaymsg", 'd')
                , jointime("delaymsg", ExtensionItem::EXT_MEMBERSHIP, Parent)
        {
-               levelrequired = OP_VALUE;
+               ranktoset = ranktounset = OP_VALUE;
        }
 
-       bool ResolveModeConflict(std::string &their_param, const std::string &our_param, Channel*)
+       bool ResolveModeConflict(std::string& their_param, const std::string& our_param, Channel*) CXX11_OVERRIDE
        {
                return (atoi(their_param.c_str()) < atoi(our_param.c_str()));
        }
 
-       ModeAction OnSet(User* source, Channel* chan, std::string& parameter);
+       ModeAction OnSet(User* source, Channel* chan, std::string& parameter) CXX11_OVERRIDE;
        void OnUnset(User* source, Channel* chan);
 
        void SerializeParam(Channel* chan, int n, std::string& out)
@@ -118,8 +118,7 @@ ModResult ModuleDelayMsg::OnUserPreMessage(User* user, void* dest, int target_ty
        {
                if (channel->GetPrefixValue(user) < VOICE_VALUE)
                {
-                       user->WriteNumeric(ERR_CANNOTSENDTOCHAN, "%s :You must wait %d seconds after joining to send to channel (+d)",
-                               channel->name.c_str(), len);
+                       user->WriteNumeric(ERR_CANNOTSENDTOCHAN, channel->name, InspIRCd::Format("You must wait %d seconds after joining to send to channel (+d)", len));
                        return MOD_RES_DENY;
                }
        }