summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-17 16:00:14 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-17 16:00:14 +0000
commit4b6bdeccb537b6f8030172c37afa7dc324e26765 (patch)
tree9c165894ba0a62072f81630fbba789770f2b63ba /include/modules.h
parent92974819e3bf1c3a97b83f6f4ccc612283120794 (diff)
Add Module::init() for correct exception handling during hook registration
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12278 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/modules.h b/include/modules.h
index 13e3dc28c..582e74275 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -347,12 +347,16 @@ class CoreExport Module : public classbase, public usecountbase
DLLManager* ModuleDLLManager;
/** Default constructor.
- * Creates a module class.
- * @param Me An instance of the InspIRCd class which will be saved into ServerInstance for your use
- * \exception ModuleException Throwing this class, or any class derived from ModuleException, causes loading of the module to abort.
+ * Creates a module class. Don't do any type of hook registration or checks
+ * for other modules here; do that in init().
*/
Module();
+ /** Module setup
+ * \exception ModuleException Throwing this class, or any class derived from ModuleException, causes loading of the module to abort.
+ */
+ virtual void init() {}
+
/** Clean up prior to destruction
* If you override, you must call this AFTER your module's cleanup
*/