From 02ce802257b0c1213d4c54cce4cbbd0708db6919 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 4 Nov 2007 16:23:06 +0000 Subject: 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 --- include/modules.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'include') 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 ModuleList; */ typedef std::vector ModuleHandleList; -typedef std::list IntModuleList; +typedef std::vector IntModuleList; typedef std::vector 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 -- cgit v1.2.3