]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/mode.h
Remove unused ProtocolInterface::SendTopic()
[user/henk/code/inspircd.git] / include / mode.h
index 364562dd7e1a27522be7a209a3ff3028e5cf1452..e7ac756ecdaa636faf524166a272776f3fcea400 100644 (file)
@@ -168,6 +168,11 @@ class CoreExport ModeHandler : public ServiceProvider
        ModeHandler(Module* me, const std::string& name, char modeletter, ParamSpec params, ModeType type, Class mclass = MC_OTHER);
        virtual CullResult cull();
        virtual ~ModeHandler();
+
+       /** Register this object in the ModeParser
+        */
+       void RegisterService() CXX11_OVERRIDE;
+
        /**
         * Returns true if the mode is a list mode
         */
@@ -473,8 +478,6 @@ class CoreExport ModeWatcher : public classbase
        virtual void AfterMode(User* source, User* dest, Channel* channel, const std::string& parameter, bool adding);
 };
 
-typedef std::multimap<std::string, ModeWatcher*>::iterator ModeWatchIter;
-
 /** The mode parser handles routing of modes and handling of mode strings.
  * It marshalls, controls and maintains both ModeWatcher and ModeHandler classes,
  * parses client to server MODE strings for user and channel modes, and performs
@@ -490,6 +493,10 @@ class CoreExport ModeParser : public fakederef<ModeParser>
        typedef TR1NS::unordered_map<std::string, ModeHandler*, irc::insensitive, irc::StrHashComp> ModeHandlerMap;
 
  private:
+       /** Type of the container that maps mode names to ModeWatchers
+        */
+       typedef insp::flat_multimap<std::string, ModeWatcher*> ModeWatcherMap;
+
        /** Last item in the ModeType enum
         */
        static const unsigned int MODETYPE_LAST = 2;
@@ -524,7 +531,7 @@ class CoreExport ModeParser : public fakederef<ModeParser>
 
        /** Mode watcher classes
         */
-       std::multimap<std::string, ModeWatcher*> modewatchermap;
+       ModeWatcherMap modewatchermap;
 
        /** Last processed mode change
         */
@@ -767,10 +774,10 @@ class CoreExport ModeParser : public fakederef<ModeParser>
        const ModeHandlerMap& GetModes(ModeType mt) const { return modehandlersbyname[mt]; }
 
        /** Show the list of a list mode to a user. Modules can deny the listing.
-     * @param user User to show the list to.
-     * @param chan Channel to show the list of.
-     * @param mh List mode to show the list of.
-     */
+        * @param user User to show the list to.
+        * @param chan Channel to show the list of.
+        * @param mh List mode to show the list of.
+        */
        void ShowListModeList(User* user, Channel* chan, ModeHandler* mh);
 };