Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[2.0] Add config variables for build settings #386

Closed
wants to merge 2 commits into from

1 participant

@SaberUK

This makes the example configuration files work correctly even on --system installations as they expand to a full path.

@SaberUK

I'm closing this as we have worked out a better way to fix it.

@SaberUK SaberUK closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
14 docs/conf/inspircd.conf.example
@@ -416,11 +416,11 @@
# This file has all the information about oper classes, types and o:lines.
# You *MUST* edit it.
-<include file="conf/opers.conf.example">
+<include file="&configpath;/opers.conf.example">
# This file has all the information about server links and ulined servers.
# You *MUST* edit it if you intend to link servers.
-<include file="conf/links.conf.example">
+<include file="&configpath;/links.conf.example">
#-#-#-#-#-#-#-#-#-#- MISCELLANEOUS CONFIGURATION -#-#-#-#-#-#-#-#-#-#
# #
@@ -430,7 +430,7 @@
# motd - displayed on connect and when a user executes /MOTD
# rules - displayed when the user executes /RULES
# Modules can also define their own files
-<files motd="conf/inspircd.motd.example" rules="conf/inspircd.rules.example">
+<files motd="&configpath;/inspircd.motd.example" rules="&configpath;/inspircd.rules.example">
# Example of an executable file include. Note this will be read on rehash,
# not when the command is run.
@@ -637,7 +637,7 @@
# in the accept queue. This is *NOT* the total maximum number of
# connections per server. Some systems may only allow this to be up
# to 5, while others (such as linux and *BSD) default to 128.
- somaxconn="128"
+ #somaxconn="128"
# softlimit: This optional feature allows a defined softlimit for
# connections. If defined, it sets a soft max connections value.
@@ -954,7 +954,7 @@
# provide almost all the features of InspIRCd. :) #
# #
# The default does nothing -- we include it for simplicity for you. #
-<include file="conf/modules.conf.example">
+<include file="&configpath;/modules.conf.example">
# Here are some pre-built modules.conf files that closely match the
# default configurations of some popular IRCd's. You still may want to
@@ -966,10 +966,10 @@
# recommended that you make your own modules file based on modules.conf.example.
# Settings similar to UnrealIRCd defaults.
-#<include file="conf/modules/modules.conf.unreal">
+#<include file="&configpath;/modules/modules.conf.unreal">
# Settings similar to Charybdis IRCd defaults.
-#<include file="conf/modules/modules.conf.charybdis">
+#<include file="&configpath;/modules/modules.conf.charybdis">
#########################################################################
View
10 docs/conf/modules.conf.example
@@ -314,7 +314,7 @@
# specify some censor tags. See also: #
# http://wiki.inspircd.org/Modules/censor #
#
-#<include file="conf/censor.conf">
+#<include file="&configpath;/censor.conf">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# CGI:IRC module: Adds support for automatic host changing in CGI:IRC
@@ -632,7 +632,7 @@
# ranktoset The numeric rank required to set/unset this mode. Defaults to rank.
# depriv Can you remove the mode from yourself? Defaults to yes.
#<customprefix name="founder" letter="q" prefix="~" rank="50000" ranktoset="50000">
-#<customprefix name="admin" letter="a" prefix="&" rank="40000" ranktoset="50000">
+#<customprefix name="admin" letter="a" prefix="&amp;" rank="40000" ranktoset="50000">
#<customprefix name="halfop" letter="h" prefix="%" rank="20000" ranktoset="30000">
#<customprefix name="halfvoice" letter="V" prefix="-" rank="1" ranktoset="20000">
@@ -770,7 +770,7 @@
# specfiy below the path to the filter.conf file, or define some #
# <filter> tags. #
# #
-#<include file="conf/filter.conf">
+#<include file="&configpath;/filter.conf">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Gecosban: Implements extended ban r:, which stops anyone matching
@@ -827,7 +827,7 @@
# specify below the path to the helpop.conf file, or if you like to #
# make a mess, define your helpop tags in this conf. #
# #
-#<include file="conf/inspircd.helpop-full.example">
+#<include file="&configpath;/inspircd.helpop-full.example">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# HIDECHANS module: Allows opers to hide their channels list from non-
@@ -1268,7 +1268,7 @@
# Read the comment above <connect:allowmotdcolors> in #
# inspircd.conf.example for details. #
# #
-#<opermotd file="conf/oper.motd" onoper="yes" processcolors="false">
+#<opermotd file="&configpath;/oper.motd" onoper="yes" processcolors="false">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Override module: Adds support for oper override
View
5 include/configparser.h
@@ -50,6 +50,11 @@ struct ParseStack
vars["amp"] = "&";
vars["quot"] = "\"";
vars["newline"] = vars["nl"] = "\n";
+
+ vars["configpath"] = CONFIG_PATH;
+ vars["datapath"] = DATA_PATH;
+ vars["logpath"] = LOG_PATH;
+ vars["modulepath"] = MOD_PATH;
}
bool ParseFile(const std::string& name, int flags);
bool ParseExec(const std::string& name, int flags);
Something went wrong with that request. Please try again.