diff options
author | Adam <Adam@anope.org> | 2012-03-27 19:14:55 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-03-27 19:14:55 -0400 |
commit | 12a6a27b52a3520c1f41a1d4d6b8e3ef25fafb23 (patch) | |
tree | 31734df3f40e076b2ff0a21297109f90e3260146 /src/modulemanager.cpp | |
parent | 31a0e673b2028f3dad67cd1e6f0f5410d0dde56d (diff) | |
parent | 8d0b4a1bf53788494fe0531dd62b4dd2ee655e9b (diff) |
Merge branch '1.9' of anope.git.sf.net:/gitroot/anope/anope into 1.9
Diffstat (limited to 'src/modulemanager.cpp')
-rw-r--r-- | src/modulemanager.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index 6837f7d1f..dd41d3940 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -80,7 +80,7 @@ static ModuleReturn moduleCopyFile(const Anope::string &name, Anope::string &out output = tmp_output; free(tmp_output); - Log(LOG_DEBUG) << "Runtime module location: " << output; + Log(LOG_DEBUG_2) << "Runtime module location: " << output; std::ofstream target(output.c_str(), std::ios_base::in | std::ios_base::binary); if (!target.is_open()) @@ -139,7 +139,13 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u) /* Don't skip return value checking! -GD */ ModuleReturn ret = moduleCopyFile(modname, pbuf); if (ret != MOD_ERR_OK) + { + if (ret == MOD_ERR_NOEXIST) + Log(LOG_TERMINAL) << "Error while loading " << modname << " (file not exists)"; + else if (ret == MOD_ERR_FILE_IO) + Log(LOG_TERMINAL) << "Error while loading " << modname << " (file IO error, check file permissions and diskspace)"; return ret; + } dlerror(); void *handle = dlopen(pbuf.c_str(), RTLD_LAZY); @@ -209,7 +215,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u) return MOD_ERR_VERSION; } else - Log(LOG_DEBUG) << "Module " << modname << " is compiled against current version of Anope " << Anope::VersionShort(); + Log(LOG_DEBUG_2) << "Module " << modname << " is compiled against current version of Anope " << Anope::VersionShort(); if (m->type == PROTOCOL && ModuleManager::FindFirstOf(PROTOCOL) != m) { @@ -217,7 +223,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u) Log() << "You cannot load two protocol modules"; return MOD_ERR_UNKNOWN; } - + Log(LOG_DEBUG) << "Module loaded."; FOREACH_MOD(I_OnModuleLoad, OnModuleLoad(u, m)); return MOD_ERR_OK; |