diff options
-rw-r--r-- | modules/commands/cs_seen.cpp | 3 | ||||
-rw-r--r-- | modules/commands/ns_ajoin.cpp | 8 | ||||
-rw-r--r-- | src/modulemanager.cpp | 12 |
3 files changed, 18 insertions, 5 deletions
diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp index 8466cf82c..0143f50d6 100644 --- a/modules/commands/cs_seen.cpp +++ b/modules/commands/cs_seen.cpp @@ -346,7 +346,8 @@ class CSSeen : public Module void OnUserConnect(dynamic_reference<User> &u, bool &exempt) anope_override { - UpdateUser(u, NEW, u->nick, "", "", ""); + if (u) + UpdateUser(u, NEW, u->nick, "", "", ""); } void OnUserNickChange(User *u, const Anope::string &oldnick) anope_override diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp index 03b710356..2e64ebfe0 100644 --- a/modules/commands/ns_ajoin.cpp +++ b/modules/commands/ns_ajoin.cpp @@ -31,7 +31,13 @@ struct AJoinList : std::vector<std::pair<Anope::string, Anope::string> >, Extens sd["nc"] << this->nc->display; Anope::string channels; for (unsigned i = 0; i < this->size(); ++i) - channels += this->at(i).first + "," + this->at(i).second; + { + channels += this->at(i).first; + if (!this->at(i).second.empty()) + channels += "," + this->at(i).second; + if (i+1 < this->size()) + channels += " "; + } sd["channels"] << channels; return sd; 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; |