summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-11-04 16:23:06 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-11-04 16:23:06 +0000
commit02ce802257b0c1213d4c54cce4cbbd0708db6919 (patch)
treecf911da2ea9d19932995a78906f45a39424df05d /include
parent2facf72164bcf6ddef3b865ee729e6918cd06fd0 (diff)
Bring back Prioritize (needs to occur after module load) with a different declaration
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8499 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/modules.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h
index b9dcd0b8d..27fec9010 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -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