1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 05:56:38 +02:00

Merge commit 'cbx/anopeng-config' into anopeng-config

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1411 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Robin Burchell w00t@inspircd.org
2008-10-03 23:30:41 +00:00
parent f85457d2a4
commit fbce6e2ba4
2 changed files with 14 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
# Note, this file will need commenting, for now, I'm not doing so
# just so I can move directives -- CyberBotX
coremodules {
ircd = "inspircd11";
};
+9 -1
View File
@@ -17,6 +17,11 @@
/*************************************************************************/
ServerConfig serverConfig;
// This is temporary while directives are transitioned from the old config to the new one -- CyberBotX
static const char *SERVICES_CONF_NEW = "services_new.conf";
/* Configurable variables: */
char *IRCDModule;
@@ -492,6 +497,7 @@ int ServerConfig::Read(bool bail)
static const char *Once[] = {NULL};
// These tags can occur ONCE or not at all
InitialConfig Values[] = {
{"coremodules", "ircd", "", new ValueContainerChar(IRCDModule), DT_CHARPTR, ValidateNotEmpty},
{NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation}
};
/* These tags can occur multiple times, and therefore they have special code to read them
@@ -506,7 +512,7 @@ int ServerConfig::Read(bool bail)
// Load and parse the config file, if there are any errors then explode
// Make a copy here so if it fails then we can carry on running with an unaffected config
newconfig.clear();
if (LoadConf(newconfig, SERVICES_CONF, errstr)) {
if (LoadConf(newconfig, SERVICES_CONF_NEW, errstr)) {
// If we succeeded, set the ircd config to the new one
config_data = newconfig;
}
@@ -1612,6 +1618,8 @@ int read_config(int reload)
}
}
retval = serverConfig.Read(reload);
if (!retval) return 0; // Temporary until most of the below is modified to use the new parser -- CyberBotX
config = fopen(SERVICES_CONF, "r");
if (!config) {
#ifndef NOT_MAIN