]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules.h
Bring back Prioritize (needs to occur after module load) with a different declaration
[user/henk/code/inspircd.git] / include / modules.h
index b9dcd0b8defff04d6c72e2352aea2dc531f0b504..27fec9010772760b7f18870b5050dec7fcafb833 100644 (file)
@@ -416,6 +416,10 @@ class CoreExport Module : public Extensible
         */
        virtual ~Module();
 
+       virtual void Prioritize()
+       {
+       }
+
        /** Returns the version number of a Module.
         * The method should return a Version object with its version information assigned via
         * Version::Version
@@ -1522,10 +1526,19 @@ typedef std::vector<Module*> ModuleList;
  */
 typedef std::vector<ircd_module*> ModuleHandleList;
 
-typedef std::list<Module*> IntModuleList;
+typedef std::vector<Module*> IntModuleList;
 typedef std::vector<IntModuleList> EventHandlerList;
 typedef IntModuleList::iterator EventHandlerIter;
 
+enum PriorityState
+{
+       PRIO_DONTCARE,
+       PRIO_FIRST,
+       PRIO_LAST,
+       PRIO_AFTER,
+       PRIO_BEFORE
+};
+
 /** ModuleManager takes care of all things module-related
  * in the core.
  */
@@ -1574,6 +1587,8 @@ class CoreExport ModuleManager : public classbase
 
        ~ModuleManager(); 
 
+       bool SetPriority(Module* mod, Implementation i, PriorityState s, Module** modules = NULL, size_t sz = 1);
+
        /** Attach an event to a module
         * @param i Event type to attach
         * @param mod Module to attach event to