summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@drink-coca-cola.info>2010-05-06 14:16:59 -0400
committerAdam <Adam@anope.org>2010-06-18 20:58:55 -0400
commit5d437d9ab5988c36def1a78c7d3d3077eb6804e3 (patch)
tree2b44daa849e45bdb3fea404d5de76e0af3a8cf17 /src
parent031bc4a8b0dc456aca4d70dc260f626b64cd82b3 (diff)
Renamed the init_module function to AnopeInit - Some systems have an init_module function outside of Anope which causes a crash if you try to load a non-Anope module
Diffstat (limited to 'src')
-rw-r--r--src/modulemanager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp
index a9f1eb2f0..18ab2bda4 100644
--- a/src/modulemanager.cpp
+++ b/src/modulemanager.cpp
@@ -164,10 +164,10 @@ int ModuleManager::LoadModule(const std::string &modname, User * u)
}
ano_modclearerr();
- func = function_cast<Module *(*)(const std::string &, const std::string &)>(dlsym(handle, "init_module"));
+ func = function_cast<Module *(*)(const std::string &, const std::string &)>(dlsym(handle, "AnopeInit"));
if (func == NULL && (err = dlerror()) != NULL)
{
- Alog() << "No magical init function found, not an Anope module";
+ Alog() << "No init function found, not an Anope module";
dlclose(handle);
return MOD_ERR_NOLOAD;
}
@@ -292,10 +292,10 @@ void ModuleManager::DeleteModule(Module *m)
handle = m->handle;
ano_modclearerr();
- destroy_func = function_cast<void (*)(Module *)>(dlsym(m->handle, "destroy_module"));
+ destroy_func = function_cast<void (*)(Module *)>(dlsym(m->handle, "AnopeFini"));
if (destroy_func == NULL && (err = dlerror()) != NULL)
{
- Alog() << "No magical destroy function found, chancing delete...";
+ Alog() << "No destroy function found, chancing delete...";
delete m; /* we just have to chance they haven't overwrote the delete operator then... */
}
else