mirror of
https://github.com/anope/anope.git
synced 2026-06-26 11:36:38 +02:00
Removed the file name arg from MODULE_INIT
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2510 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -137,7 +137,7 @@ TYPE function_cast(ano_module_t symbol)
|
||||
int ModuleManager::LoadModule(const std::string &modname, User * u)
|
||||
{
|
||||
const char *err;
|
||||
Module *(*func)(const std::string &);
|
||||
Module *(*func)(const std::string &, const std::string &);
|
||||
int ret = 0;
|
||||
|
||||
if (modname.empty())
|
||||
@@ -181,7 +181,7 @@ int ModuleManager::LoadModule(const std::string &modname, User * u)
|
||||
}
|
||||
|
||||
ano_modclearerr();
|
||||
func = function_cast<Module *(*)(const std::string &)>(dlsym(handle, "init_module"));
|
||||
func = function_cast<Module *(*)(const std::string &, const std::string &)>(dlsym(handle, "init_module"));
|
||||
if (func == NULL && (err = dlerror()) != NULL)
|
||||
{
|
||||
alog("No magical init function found, not an Anope module");
|
||||
@@ -205,7 +205,7 @@ int ModuleManager::LoadModule(const std::string &modname, User * u)
|
||||
|
||||
try
|
||||
{
|
||||
m = func(nick);
|
||||
m = func(modname, nick);
|
||||
}
|
||||
catch (ModuleException &ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user