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/modules.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/modules.cpp')
-rw-r--r-- | src/modules.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index c90410896..0a7d813c5 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -46,19 +46,19 @@ int protocol_module_init() { int ret = 0; - Alog() << "Loading IRCD Protocol Module: [" << Config.IRCDModule << "]"; - ret = ModuleManager::LoadModule(Config.IRCDModule, NULL); + Alog() << "Loading IRCD Protocol Module: [" << Config->IRCDModule << "]"; + ret = ModuleManager::LoadModule(Config->IRCDModule, NULL); if (ret == MOD_ERR_OK) { - FindModule(Config.IRCDModule)->SetType(PROTOCOL); + FindModule(Config->IRCDModule)->SetType(PROTOCOL); /* This is really NOT the correct place to do config checks, but * as we only have the ircd struct filled here, we have to over * here. -GD */ if (ircd->ts6) { - if (Config.Numeric.empty()) + if (Config->Numeric.empty()) { Alog() << "This IRCd protocol requires a server id to be set in Anope's configuration."; ret = -1; @@ -256,7 +256,7 @@ bool moduleMinVersion(int major, int minor, int patch, int build) void Module::NoticeLang(const Anope::string &source, const User *u, int number, ...) const { /* Find the users lang, and use it if we can */ - int mlang = Config.NSDefLanguage; + int mlang = Config->NSDefLanguage; if (u && u->Account()) mlang = u->Account()->language; @@ -289,7 +289,7 @@ const char *Module::GetLangString(User *u, int number) { /* Find the users lang, and use it if we can */ - int mlang = Config.NSDefLanguage; + int mlang = Config->NSDefLanguage; if (u && u->Account()) mlang = u->Account()->language; |