diff options
author | Adam <Adam@anope.org> | 2010-08-17 19:27:37 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-08-17 19:27:37 -0400 |
commit | e65d8b2f3dfdb40858259b3bb48ef6998c31e62f (patch) | |
tree | fd845bdef5664d025ab19c262ae2c5e9d23d7bb2 /src/modulemanager.cpp | |
parent | 2575008baa5c9d0ca789680da1a3b81dc74786f7 (diff) |
Rewrote the config reader to better handle invalid configs.
This prevents Anope from exploding when /os reload has errors.
Diffstat (limited to 'src/modulemanager.cpp')
-rw-r--r-- | src/modulemanager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index 8ab72eef5..b5f0d51f2 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -203,7 +203,7 @@ int ModuleManager::LoadModule(const Anope::string &modname, User *u) if (u) { ircdproto->SendGlobops(OperServ, "%s loaded module %s", u->nick.c_str(), modname.c_str()); - notice_lang(Config.s_OperServ, u, OPER_MODULE_LOADED, modname.c_str()); + notice_lang(Config->s_OperServ, u, OPER_MODULE_LOADED, modname.c_str()); /* If a user is loading this module, then the core databases have already been loaded * so trigger the event manually @@ -221,21 +221,21 @@ int ModuleManager::UnloadModule(Module *m, User *u) if (!m || !m->handle) { if (u) - notice_lang(Config.s_OperServ, u, OPER_MODULE_REMOVE_FAIL, m->name.c_str()); + notice_lang(Config->s_OperServ, u, OPER_MODULE_REMOVE_FAIL, m->name.c_str()); return MOD_ERR_PARAMS; } if (m->GetPermanent() || m->type == PROTOCOL || m->type == ENCRYPTION || m->type == DATABASE) { if (u) - notice_lang(Config.s_OperServ, u, OPER_MODULE_NO_UNLOAD); + notice_lang(Config->s_OperServ, u, OPER_MODULE_NO_UNLOAD); return MOD_ERR_NOUNLOAD; } if (u) { ircdproto->SendGlobops(OperServ, "%s unloaded module %s", u->nick.c_str(), m->name.c_str()); - notice_lang(Config.s_OperServ, u, OPER_MODULE_UNLOADED, m->name.c_str()); + notice_lang(Config->s_OperServ, u, OPER_MODULE_UNLOADED, m->name.c_str()); } FOREACH_MOD(I_OnModuleUnload, OnModuleUnload(u, m)); |