mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-08 16:33:14 +02:00
ship with modules.full.conf (rather than modules.conf) and add note as to not to edit this file directly.
add updconf stuff for new layout (badwords, help, etc)
This commit is contained in:
@@ -190,6 +190,10 @@ install: all
|
||||
$(INSTALL) -m 0600 doc/conf/*.conf @CONFDIR@
|
||||
$(INSTALL) -m 0700 -d @CONFDIR@/aliases
|
||||
$(INSTALL) -m 0600 doc/conf/aliases/*.conf @CONFDIR@/aliases
|
||||
$(INSTALL) -m 0700 -d @CONFDIR@/help
|
||||
$(INSTALL) -m 0600 doc/conf/help/*.conf @CONFDIR@/help
|
||||
$(INSTALL) -m 0700 -d @CONFDIR@/examples
|
||||
$(INSTALL) -m 0600 doc/conf/examples/*.conf @CONFDIR@/examples
|
||||
$(INSTALL) -m 0700 -d @CONFDIR@/ssl
|
||||
$(INSTALL) -m 0600 doc/conf/ssl/curl-ca-bundle.crt @CONFDIR@/ssl
|
||||
$(INSTALL) -m 0700 unrealircd @SCRIPTDIR@
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
# This is also a comment, again this line is ignored (comment type #3)
|
||||
|
||||
/* UnrealIRCd makes heavy use of modules. By using this include we
|
||||
* tell the ircd to read the file 'modules.conf' which contains of
|
||||
* tell the ircd to read the file 'modules.full.conf' which contains
|
||||
* more than a hundred loadmodule lines that load all the necessary
|
||||
* modules.
|
||||
*/
|
||||
include "modules.conf";
|
||||
include "modules.full.conf";
|
||||
|
||||
/* Now let's include some other files as well:
|
||||
* - help.conf for our on-IRC /HELPOP system
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
|
||||
/*
|
||||
* UnrealIRCd supporte des modules et certains sont obligatoires.
|
||||
* La ligne suivante charge tous les modules définis dans modules.conf
|
||||
* La ligne suivante charge tous les modules définis dans modules.full.conf
|
||||
*/
|
||||
include "modules.conf";
|
||||
include "modules.full.conf";
|
||||
|
||||
/*
|
||||
* Vous pouvez également inclure d'autres fichiers de configuration.
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
/*
|
||||
* Modules configuration stub... More work will be done on this later.
|
||||
/* This file will load (nearly) all modules available on UnrealIRCd.
|
||||
* So all commands, channel modes, user modes, etc..
|
||||
*
|
||||
* If you want to have all UnrealIRCd functionality, then include this
|
||||
* file from your unrealircd.conf by using:
|
||||
* include "modules.full.conf";
|
||||
*
|
||||
* DO NOT EDIT THIS FILE! IT WILL BE OVERWRITTEN DURING NEXT UPGRADE!
|
||||
*
|
||||
* Instead, if you want to customize the modules to load, make a
|
||||
* copy of this file (eg: name it modules.custom.conf) and edit it.
|
||||
* Then include that file from your unrealircd.conf instead of this one.
|
||||
*/
|
||||
|
||||
loadmodule "cloak";
|
||||
+1
-1
@@ -1616,7 +1616,7 @@ int i, n, errors=0;
|
||||
if (n < 1)
|
||||
{
|
||||
config_error("ERROR: efunction '%s' not found, you probably did not "
|
||||
"load all required modules! (hint: see modules.conf)",
|
||||
"load all required modules! (hint: see modules.full.conf)",
|
||||
efunction_table[i].name);
|
||||
errors++;
|
||||
} else
|
||||
|
||||
+1
-1
@@ -8220,7 +8220,7 @@ int _conf_loadmodule(ConfigFile *conf, ConfigEntry *ce)
|
||||
{
|
||||
config_error("%s:%i: You are trying to load the 'commands' module, this is no longer supported. "
|
||||
"Fix this by editing your configuration file: remove the loadmodule line for commands and add the following line instead: "
|
||||
"include \"modules.conf\";",
|
||||
"include \"modules.full.conf\";",
|
||||
ce->ce_fileptr->cf_filename, ce->ce_varlinenum);
|
||||
need_34_upgrade = 1;
|
||||
return -1;
|
||||
|
||||
+45
-4
@@ -498,16 +498,16 @@ int upgrade_loadmodule(ConfigEntry *ce)
|
||||
|
||||
if (our_strcasestr(file, "commands.dll") || our_strcasestr(file, "/commands.so"))
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "include \"modules.conf\";\n");
|
||||
snprintf(buf, sizeof(buf), "include \"modules.full.conf\";\n");
|
||||
replace_section(ce, buf);
|
||||
config_status("- loadmodule for '%s' replaced with an include \"modules.conf\"", file);
|
||||
config_status("- loadmodule for '%s' replaced with an include \"modules.full.conf\"", file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (our_strcasestr(file, "cloak.dll") || our_strcasestr(file, "/cloak.so"))
|
||||
{
|
||||
replace_section(ce, "/* NOTE: cloaking module is included in modules.conf */");
|
||||
config_status("- loadmodule for '%s' removed as this is now in modules.conf", file);
|
||||
replace_section(ce, "/* NOTE: cloaking module is included in modules.full.conf */");
|
||||
config_status("- loadmodule for '%s' removed as this is now in modules.full.conf", file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -532,6 +532,40 @@ int upgrade_loadmodule(ConfigEntry *ce)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int upgrade_include(ConfigEntry *ce)
|
||||
{
|
||||
char *file = ce->ce_vardata;
|
||||
char tmp[512], *p, *newfile;
|
||||
static int badwords_upgraded_already = 0;
|
||||
|
||||
if (!file)
|
||||
return 0;
|
||||
|
||||
if (!strstr(file, "help/") && !_match("help*.conf", file))
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "include \"help/%s\";\n", file);
|
||||
replace_section(ce, buf);
|
||||
config_status("- include for '%s' replaced with 'help/%s'", file, file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!_match("badwords.*.conf", file))
|
||||
{
|
||||
if (badwords_upgraded_already)
|
||||
{
|
||||
strcpy(buf, "/* all badwords are now in badwords.conf */\n");
|
||||
} else {
|
||||
strcpy(buf, "include \"badwords.conf\";\n");
|
||||
badwords_upgraded_already = 1;
|
||||
}
|
||||
replace_section(ce, buf);
|
||||
config_status("- include for '%s' replaced (now in badwords.conf)", file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define MAXSPFTARGETS 32
|
||||
int upgrade_spamfilter_block(ConfigEntry *ce)
|
||||
{
|
||||
@@ -926,6 +960,11 @@ again:
|
||||
if (upgrade_loadmodule(ce))
|
||||
goto again;
|
||||
}
|
||||
if (!strcmp(ce->ce_varname, "include"))
|
||||
{
|
||||
if (upgrade_include(ce))
|
||||
goto again;
|
||||
}
|
||||
if (!strcmp(ce->ce_varname, "me"))
|
||||
{
|
||||
if (upgrade_me_block(ce))
|
||||
@@ -1070,6 +1109,8 @@ void update_conf(void)
|
||||
|
||||
for (; cf; cf = cf->cf_next)
|
||||
{
|
||||
if (!file_exists(cf->cf_filename))
|
||||
continue; /* skip silently. errors were already shown earlier by build_include_list anyway. */
|
||||
configfile = cf->cf_filename;
|
||||
config_status("Checking '%s'...", cf->cf_filename);
|
||||
snprintf(configfiletmp, sizeof(configfiletmp), "%s.tmp", configfile);
|
||||
|
||||
@@ -44,7 +44,7 @@ Source: "..\..\badwords.channel.conf"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\badwords.message.conf"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\badwords.quit.conf"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\spamfilter.conf"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\modules.conf"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\modules.*.conf"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\dccallow.conf"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\Donation"; DestDir: "{app}"; DestName: "Donation.txt"; Flags: ignoreversion
|
||||
Source: "..\..\help.conf"; DestDir: "{app}"; Flags: ignoreversion
|
||||
|
||||
Reference in New Issue
Block a user