]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/mode.h
Add ModeParser::IsModeChar to standardise mode validation.
[user/henk/code/inspircd.git] / include / mode.h
index 35af686854cefd497b49f0b82d3cf3edd6b6a962..6b481e7796c744a2efbf2e5055401b2899d9c25c 100644 (file)
@@ -166,7 +166,7 @@ class CoreExport ModeHandler : public ServiceProvider
         * @param mclass The object type of this mode handler, one of ModeHandler::Class
         */
        ModeHandler(Module* me, const std::string& name, char modeletter, ParamSpec params, ModeType type, Class mclass = MC_OTHER);
-       virtual CullResult cull();
+       virtual CullResult cull() CXX11_OVERRIDE;
        virtual ~ModeHandler();
 
        /** Register this object in the ModeParser
@@ -241,7 +241,7 @@ class CoreExport ModeHandler : public ServiceProvider
 
        /** For user modes, return the current parameter, if any
         */
-       virtual std::string GetUserParameter(User* useor);
+       virtual std::string GetUserParameter(const User* user) const;
 
        /**
         * Called when a channel mode change access check for your mode occurs.
@@ -380,7 +380,7 @@ class CoreExport PrefixMode : public ModeHandler
 
        /**
         * Removes this prefix mode from all users on the given channel
-        * @param chan The channel which the server wants to remove your mode from
+        * @param channel The channel which the server wants to remove your mode from
         * @param changelist Mode change list to populate with the removal of this mode
         */
        void RemoveMode(Channel* channel, Modes::ChangeList& changelist);
@@ -630,6 +630,8 @@ class CoreExport ModeParser : public fakederef<ModeParser>
         */
        static void InitBuiltinModes();
 
+       static bool IsModeChar(char chr);
+
        /** Tidy a banmask. This makes a banmask 'acceptable' if fields are left out.
         * E.g.
         *