diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-06-03 14:27:40 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-06-03 14:27:40 +0000 |
commit | e0cba0bb71611f82434b7f061760d105423bbe09 (patch) | |
tree | 7f1d58a67896f98bddc28077c51325bc0d0423a0 /src/modules.c | |
parent | 31163a2cbcf66af94976f53d4712e4b66a4e7fdc (diff) |
BUILD : 1.7.10 (823) BUGS : 385 391 NOTES : Moved checks for UseTokens, UseTS6, and Numeric into protocol_module_init because they need the ircd struct, and split init() into two functions to load the protocol module for listnicks/listchans.
git-svn-id: svn://svn.anope.org/anope/trunk@823 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@576 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules.c')
-rw-r--r-- | src/modules.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/modules.c b/src/modules.c index c721014b5..1d9fb92c7 100644 --- a/src/modules.c +++ b/src/modules.c @@ -121,6 +121,7 @@ int protocol_module_init(void) { int ret = 0; Module *m; + m = createModule(IRCDModule); mod_current_module = m; mod_current_user = NULL; @@ -129,6 +130,27 @@ int protocol_module_init(void) moduleSetType(PROTOCOL); alog("status: [%d]", ret); mod_current_module = NULL; + + /* 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 (UseTokens && !(ircd->token)) { + alog("Anope does not support TOKENS for this ircd setting; unsetting UseToken"); + UseTokens = 0; + } + + if (UseTS6 && !(ircd->ts6)) { + alog("Chosen IRCd does not support TS6, unsetting UseTS6"); + UseTS6 = 0; + } + + /* We can assume the ircd supports TS6 here */ + if (UseTS6 && !Numeric) { + error(0, "UseTS6 requires the setting of Numeric to be enabled."); + ret = -1; + } + return ret; } |