summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-06-01 16:38:00 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-06-01 16:38:00 +0000
commit878e437589ee448bc2e87200890cbd446accfc68 (patch)
tree93002a1f7100e4abd8eeee988bf5672de3c491e0 /include/modules.h
parentee10c76ebbf3a31012b637d744c3d87493a806c3 (diff)
Added OnLoadModule and OnUnloadModule (OnLoadModule was not triggering)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1586 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/modules.h b/include/modules.h
index 0737f9e17..91f9604e5 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -491,6 +491,18 @@ class Module : public classbase
*/
virtual void OnLoadModule(Module* mod,std::string name);
+ /** Called whenever a module is unloaded.
+ * mod will contain a pointer to the module, and string will contain its name,
+ * for example m_widgets.so. This function is primary for dependency checking,
+ * your module may decide to enable some extra features if it sees that you have
+ * for example loaded "m_killwidgets.so" with "m_makewidgets.so". It is highly
+ * recommended that modules do *NOT* bail if they cannot satisfy dependencies,
+ * but instead operate under reduced functionality, unless the dependency is
+ * absolutely neccessary (e.g. a module that extends the features of another
+ * module).
+ */
+ virtual void OnUnloadModule(Module* mod,std::string name);
+
/** Called once every five seconds for background processing.
* This timer can be used to control timed features. Its period is not accurate
* enough to be used as a clock, but it is gauranteed to be called at least once in