]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/event.h
Fix erasing event subscribers erasing all with the same priority.
[user/henk/code/inspircd.git] / include / event.h
index 73a45a5419a7396950851e210078e7cdebfb6aa3..92bb4ffec604f0d1f36024d3e3e50fa6a5dae970 100644 (file)
@@ -39,7 +39,7 @@ class Events::ModuleEventProvider : public ServiceProvider, private dynamic_refe
                bool operator()(ModuleEventListener* one, ModuleEventListener* two) const;
        };
 
-       typedef insp::flat_multiset<ModuleEventListener*, Comp> SubscriberList;
+       typedef insp::flat_multiset<ModuleEventListener*, Comp, std::less<ModuleEventListener*> > SubscriberList;
 
        /** Constructor
         * @param mod Module providing the event(s)
@@ -104,6 +104,7 @@ class Events::ModuleEventListener : private dynamic_reference_base::CaptureHook
        /** Constructor
         * @param mod Module subscribing
         * @param eventid Identifier of the event to subscribe to
+        * @param eventprio The priority to give this event listener
         */
        ModuleEventListener(Module* mod, const std::string& eventid, unsigned int eventprio = DefaultPriority)
                : prov(mod, eventid)