summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-02 03:15:46 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-02 03:15:46 +0000
commit8456cf5ccd44911f4e56538fe0880dd7fc7cd96d (patch)
tree3e1f96b94cc86506a615d8b39131ff6ea7c1b64c /include/modules.h
parent87d031609bb8b7d2cd186d8f24bcb853fd93798c (diff)
Fix valgrind issues and crashes on exit
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11794 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/modules.h b/include/modules.h
index edfe31007..c9927133f 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -408,6 +408,9 @@ class CoreExport Module : public Extensible
/** File that this module was loaded from
*/
std::string ModuleSourceFile;
+ /** Reference to the dlopen() value
+ */
+ DLLFactory* ModuleDLLFactory;
/** Default constructor.
* Creates a module class.
@@ -416,6 +419,11 @@ class CoreExport Module : public Extensible
*/
Module();
+ /** Clean up prior to destruction
+ * If you override, you must call this AFTER your module's cleanup
+ */
+ virtual bool cull();
+
/** Default destructor.
* destroys a module class
*/
@@ -1507,14 +1515,6 @@ class CoreExport FileReader : public classbase
int FileSize();
};
-/** A DLLFactory (designed to load shared objects) containing a
- * handle to a module's init_module() function. Unfortunately,
- * due to the design of shared object systems we must keep this
- * hanging around, as if we remove this handle, we remove the
- * shared object file from memory (!)
- */
-typedef DLLFactory<Module> ircd_module;
-
/** A list of modules
*/
typedef std::vector<Module*> IntModuleList;
@@ -1548,7 +1548,7 @@ class CoreExport ModuleManager : public classbase
/** List of loaded modules and shared object/dll handles
* keyed by module name
*/
- std::map<std::string, std::pair<ircd_module*, Module*> > Modules;
+ std::map<std::string, Module*> Modules;
enum {
PRIO_STATE_FIRST,